Skip to content

Commit

Permalink
gixcup etcdmain cov
Browse files Browse the repository at this point in the history
  • Loading branch information
heyitsanthony committed Jul 20, 2017
1 parent 45e02e1 commit cf8c515
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions etcdmain/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,13 @@ func Main() {
checkSupportArch()

if len(os.Args) > 1 {
if len(os.Getenv("ETCDCOV_ARGS")) > 0 {
rootCmd.SetArgs(strings.Split(os.Getenv("ETCDCOV_ARGS"), "\xe7\xcd")[1:])
cmd := os.Args[1]
if covArgs := os.Getenv("ETCDCOV_ARGS"); len(covArgs) > 0 {
args := strings.Split(os.Getenv("ETCDCOV_ARGS"), "\xe7\xcd")[1:]
rootCmd.SetArgs(args)
cmd = "grpc-proxy"
}
switch os.Args[1] {
switch cmd {
case "gateway", "grpc-proxy":
if err := rootCmd.Execute(); err != nil {
fmt.Fprint(os.Stderr, err)
Expand Down

0 comments on commit cf8c515

Please sign in to comment.