diff --git a/clientv3/config.go b/clientv3/config.go index 34cec6d64..494999bdd 100644 --- a/clientv3/config.go +++ b/clientv3/config.go @@ -45,7 +45,7 @@ type Config struct { Logger Logger } -type YamlConfig struct { +type yamlConfig struct { Endpoints []string `json:"endpoints"` DialTimeout time.Duration `json:"dial-timeout"` InsecureTransport bool `json:"insecure-transport"` @@ -61,7 +61,7 @@ func configFromFile(fpath string) (*Config, error) { return nil, err } - yc := &YamlConfig{} + yc := &yamlConfig{} err = yaml.Unmarshal(b, yc) if err != nil { diff --git a/clientv3/config_test.go b/clientv3/config_test.go index 10661671f..d8d86a542 100644 --- a/clientv3/config_test.go +++ b/clientv3/config_test.go @@ -32,22 +32,22 @@ var ( func TestConfigFromFile(t *testing.T) { tests := []struct { - ym *YamlConfig + ym *yamlConfig werr bool }{ { - &YamlConfig{}, + &yamlConfig{}, false, }, { - &YamlConfig{ + &yamlConfig{ InsecureTransport: true, }, false, }, { - &YamlConfig{ + &yamlConfig{ Keyfile: privateKeyPath, Certfile: certPath, CAfile: caPath, @@ -56,14 +56,14 @@ func TestConfigFromFile(t *testing.T) { false, }, { - &YamlConfig{ + &yamlConfig{ Keyfile: "bad", Certfile: "bad", }, true, }, { - &YamlConfig{ + &yamlConfig{ Keyfile: privateKeyPath, Certfile: certPath, CAfile: "bad",