Skip to content

Commit

Permalink
Remove default from global flag
Browse files Browse the repository at this point in the history
  • Loading branch information
boris-ilijic committed Nov 13, 2023
1 parent fc49b5f commit ccdbac2
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion cli/ngs_command.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ func configureNgsCommand(app commandHost) {

rtt := ngs.Command("rtt", "Displays RTT for all NGS endpoints. See: https://docs.synadia.com/ngs/resources/connection-endpoints").Action(c.rttHandler)
rtt.Arg("iterations", "How many round trips to do when testing each NGS endpoint").Default("3").IntVar(&c.rttCmd.iterations)
rtt.Flag("global", fmt.Sprintf("query default (global) endpoint: %s", globalEp)).Default("true").Short('g').UnNegatableBoolVar(&c.global)
rtt.Flag("global", fmt.Sprintf("query default (global) endpoint: %s", globalEp)).Short('g').UnNegatableBoolVar(&c.global)
rtt.Flag("all-clouds", "query all Cloud Endpoints (AWS, AZ, GCP)").Short('c').UnNegatableBoolVar(&c.cloudAll)
rtt.Flag("aws", fmt.Sprintf("query AWS Cloud Endpoint: %s", cloudAWSEp)).UnNegatableBoolVar(&c.cloudAWS)
rtt.Flag("az", fmt.Sprintf("query AZ Cloud Endpoint: %s", cloudAZEp)).UnNegatableBoolVar(&c.cloudAZ)
Expand Down Expand Up @@ -175,5 +175,9 @@ func (c *ngsCmd) resolveServers() string {
}
}

if len(servers) == 0 {
servers = append((servers), globalEp)
}

return fmtRes(servers)
}

0 comments on commit ccdbac2

Please sign in to comment.