Skip to content

Commit a41e374

Browse files
authored
fix(cmd/ndt7-client): avoid confusing -locate.url help string (#108)
fix(cmd/ndt7-client): remove backticks from -locate.url usage string The -locate.url flag's usage string contained backticks around `-locate.token`, which caused the flag package to incorrectly display the flag name as "-locate.url -locate.token" in help output. Go's flag package treats backticked text in usage strings as parameter names to display in help output (e.g., flag.String("I", "", "search `directory` for files") displays as "-I directory"). The backticks around -locate.token were being extracted as the parameter name. Removed the backticks to fix the confusing help display. See: https://pkg.go.dev/flag#hdr-Usage_messages
1 parent ea8f04b commit a41e374

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

cmd/ndt7-client/main.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -154,9 +154,9 @@ var (
154154
flagLocateURL = fset.String(
155155
"locate.url",
156156
"",
157-
"Override the default locate URL. If the URL is empty, we use a suitable"+
158-
"https://locate.measurementlab.net/{path} URL where the {path} depends on"+
159-
"whether you specified `-locate.token` or not.")
157+
"Override the default locate URL. If the URL is empty, we use a suitable "+
158+
"https://locate.measurementlab.net/{path} URL where the {path} depends on "+
159+
"whether you specified -locate.token or not.")
160160
)
161161

162162
func init() {

0 commit comments

Comments
 (0)