Browse Source

Clientv3: Fix govet error for gotip

Manjunath A Kumatagi 8 years ago
parent
commit
18746c65da
1 changed files with 2 additions and 1 deletions
  1. 2 1
      clientv3/client.go

+ 2 - 1
clientv3/client.go

@@ -56,7 +56,7 @@ type Client struct {
 	cfg      Config
 	cfg      Config
 	creds    *credentials.TransportCredentials
 	creds    *credentials.TransportCredentials
 	balancer *healthBalancer
 	balancer *healthBalancer
-	mu       sync.Mutex
+	mu       *sync.Mutex
 
 
 	ctx    context.Context
 	ctx    context.Context
 	cancel context.CancelFunc
 	cancel context.CancelFunc
@@ -385,6 +385,7 @@ func newClient(cfg *Config) (*Client, error) {
 		creds:    creds,
 		creds:    creds,
 		ctx:      ctx,
 		ctx:      ctx,
 		cancel:   cancel,
 		cancel:   cancel,
+		mu:       new(sync.Mutex),
 	}
 	}
 	if cfg.Username != "" && cfg.Password != "" {
 	if cfg.Username != "" && cfg.Password != "" {
 		client.Username = cfg.Username
 		client.Username = cfg.Username