diff --git a/etcd_resolver_test.go b/etcd_resolver_test.go index 35ded9a..b0d82fd 100644 --- a/etcd_resolver_test.go +++ b/etcd_resolver_test.go @@ -514,9 +514,9 @@ func teardownEmbedEtcd(s *embed.Etcd) { func TestEtcdResolverWithEtcdPrefix(t *testing.T) { s, endpoint := setupEmbedEtcd(t) tpl := "etcd/v1" - rg, err := NewEtcdRegistry([]string{endpoint}, WithEtcdConfigAndPrefix(tpl)) + rg, err := NewEtcdRegistry([]string{endpoint}, WithEtcdServicePrefix(tpl)) require.Nil(t, err) - rs, err := NewEtcdResolver([]string{endpoint}, WithEtcdConfigAndPrefix(tpl)) + rs, err := NewEtcdResolver([]string{endpoint}, WithEtcdServicePrefix(tpl)) require.Nil(t, err) infoList := []registry.Info{ diff --git a/option.go b/option.go index dcce768..c8a90ab 100644 --- a/option.go +++ b/option.go @@ -79,8 +79,8 @@ func newTLSConfig(certFile, keyFile, caFile, serverName string) (*tls.Config, er return cfg, nil } -// WithEtcdConfigAndPrefix returns an option that sets the Prefix field in the Config struct -func WithEtcdConfigAndPrefix(prefix string) Option { +// WithEtcdServicePrefix returns an option that sets the Prefix field in the Config struct +func WithEtcdServicePrefix(prefix string) Option { return func(c *Config) { c.Prefix = prefix }