Skip to content

Commit 169ecec

Browse files
authored
fix show help message
Convert flag.Usage to flag.CommandLine.Usage for avoid showing the default help message printout
1 parent 334a9ec commit 169ecec

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

config.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,8 @@ func parseCommandLine() *Config {
5454
var mainConfig Config
5555
var config libwebsocketd.Config
5656

57-
flag.Usage = func() {}
5857
flag.CommandLine = flag.NewFlagSet(os.Args[0], flag.ContinueOnError)
58+
flag.CommandLine.Usage = func() {}
5959

6060
// If adding new command line options, also update the help text in help.go.
6161
// The flag library's auto-generate help message isn't pretty enough.

0 commit comments

Comments
 (0)