Skip to content

Commit

Permalink
Merge pull request #1785 from Shopify/client-interface-private
Browse files Browse the repository at this point in the history
Add private method to Client interface to prevent implementation
  • Loading branch information
dnwe committed Sep 24, 2020
2 parents a904204 + 47ad801 commit 84360ef
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions client.go
Expand Up @@ -93,6 +93,9 @@ type Client interface {

// Closed returns true if the client has already had Close called on it
Closed() bool

// A private method to prevent users implementing the interface for compatibility
private()
}

const (
Expand Down Expand Up @@ -184,6 +187,8 @@ func NewClient(addrs []string, conf *Config) (Client, error) {
return client, nil
}

func (client *client) private() {}

func (client *client) Config() *Config {
return client.conf
}
Expand Down

0 comments on commit 84360ef

Please sign in to comment.