Procházet zdrojové kódy

Clientv3: Fix govet error for gotip

Manjunath A Kumatagi před 8 roky
rodič
revize
18746c65da
1 změnil soubory, kde provedl 2 přidání a 1 odebrání
  1. 2 1
      clientv3/client.go

+ 2 - 1
clientv3/client.go

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