Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add private method to Client interface to prevent implementation #1785

Merged
merged 1 commit into from Sep 24, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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 @@ -187,6 +190,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