Skip to content

Commit

Permalink
Merge pull request #39 from logicwu0/fix/prefix-config
Browse files Browse the repository at this point in the history
fix/rename method
  • Loading branch information
GuangmingLuo authored Jul 4, 2024
2 parents da79456 + e00d6c9 commit 5c2a4de
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions etcd_resolver_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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{
Expand Down
4 changes: 2 additions & 2 deletions option.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down

0 comments on commit 5c2a4de

Please sign in to comment.