From 47ad801aa8fe0af20c4e36314c501e51aa522799 Mon Sep 17 00:00:00 2001 From: Justin Chen Date: Wed, 19 Aug 2020 11:50:40 -0400 Subject: [PATCH] Add private method to Client interface to prevent implementation --- client.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/client.go b/client.go index b80cc593c..20d67bdca 100644 --- a/client.go +++ b/client.go @@ -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 ( @@ -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 }