Skip to content
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

Merged
merged 3 commits into from
May 31, 2024

Conversation

yuxialuozi
Copy link
Contributor

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:

@@ -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},
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这个改下描述,说明一下不推荐使用了?

config/server.go Outdated Show resolved Hide resolved
@@ -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 == "" {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1

@yuxialuozi
Copy link
Contributor Author

修改了两参数指向同一个变量(server_name)

@@ -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},
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这里的描述是否可以加上在 0.2.0 这个参数会被下掉

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

bug和此建议全部已经修改完毕

@li-jin-gou li-jin-gou merged commit ce07e0a into cloudwego:main May 31, 2024
5 checks passed
@yuxialuozi yuxialuozi deleted the serverName branch July 25, 2024 05:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants