소스 검색

refactor: 优化注册中心的Namespace处理

lihf 3 달 전
부모
커밋
484cca7930
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      registry/registry.go

+ 1 - 1
registry/registry.go

@@ -33,7 +33,7 @@ func Context(ctx context.Context) Option {
 
 // Namespace with registry namespace.
 func Namespace(ns string) Option {
-	return func(o *options) { o.namespace = ns }
+	return func(o *options) { o.namespace = fmt.Sprintf("/%s/naming", ns) }
 }
 
 // RegisterTTL with register ttl.