apache / servicecomb-mesher

A high performance service mesh implementation written in go

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

小bug?

superufo opened this issue · comments

https://github.com/apache/servicecomb-mesher/blob/master/proxy/cmd/cmd.go

func parseConfigFromCmd(args []string) (err error) {
app := cli.NewApp()
app.HideVersion = true
app.Usage = "a service mesh that governance your service traffic."
app.Flags = []cli.Flag{
cli.StringFlag{
Name: "config",
Usage: "mesher config file, example: --config=mesher.yaml",
Destination: &Configs.ConfigFile,
},
cli.StringFlag{
Name: "mode",
Value: common.RoleSidecar,
Usage: fmt.Sprintf("mesher role [ %s|%s|%s ]",
common.RolePerHost, common.RoleSidecar, common.RoleEdge),
Destination: &Configs.Role,
},
cli.StringFlag{
Name: "service-ports",
EnvVar: common.EnvServicePorts,
Usage: fmt.Sprintf("service protocol and port,examples: --service-ports=http:3000,grpc:8000"),
Destination: &Configs.LocalServicePorts,
},
}
app.Action = func(c *cli.Context) error {
return nil
}

err = app.Run(args)
return

}

**这句代码 EnvVar: common.EnvServicePorts, 应该 是 EnvVar: os.Getenv(common.EnvServicePorts), 吧? 求证 ? **

commented

嗯,确实是bug,请帮忙修改,直接从archaius里面读吧