Go Tip: Creating Closed Interfaces

In go , interfaces are satisfied by any type that implements all of the methods defined in the interface. This makes Go interfaces &ldquo;open&rdquo; types, meaning that any type can satisfy an interface at any time. However, did you know that Go actually has a mechanism for restricting who can implement these types? This go-tip will tell you how you can accomplish this.