-
Notifications
You must be signed in to change notification settings - Fork 55
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix:change the parameter service to server_name #190
Conversation
cmd/static/server_flags.go
Outdated
@@ -26,6 +26,7 @@ func serverFlags() []cli.Flag { | |||
globalArgs := config.GetGlobalArgs() | |||
return []cli.Flag{ | |||
&cli.StringFlag{Name: consts.Service, Usage: "Specify the service name.", Destination: &globalArgs.ServerArgument.Service}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这个改下描述,说明一下不推荐使用了?
pkg/client/check.go
Outdated
@@ -41,8 +41,8 @@ func check(ca *config.ClientArgument) error { | |||
return errors.New("unsupported registry") | |||
} | |||
|
|||
if ca.Service == "" { | |||
return errors.New("must specify service name when use registry") | |||
if ca.Service == "" && ca.ServerName == "" { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1
修改了两参数指向同一个变量(server_name) |
cmd/static/client_flags.go
Outdated
@@ -25,7 +25,8 @@ import ( | |||
func clientFlags() []cli.Flag { | |||
globalArgs := config.GetGlobalArgs() | |||
return []cli.Flag{ | |||
&cli.StringFlag{Name: consts.Service, Usage: "Specify the service name.", Destination: &globalArgs.ClientArgument.Service}, | |||
&cli.StringFlag{Name: consts.Service, Usage: "Specify the server name.(Not recommended)", Destination: &globalArgs.ClientArgument.ServerName}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这里的描述是否可以加上在 0.2.0 这个参数会被下掉
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
bug和此建议全部已经修改完毕
What type of PR is this?
fix
What this PR does / why we need it (en: English/zh: Chinese):
en: Change the parameter service to server_name.The service parameter name is not easily understood by the user.
zh: 修复service参数名称为server_name,service参数名称不容易被用户理解。
Which issue(s) this PR fixes: