diff --git a/httpbin/cmd/cmd.go b/httpbin/cmd/cmd.go index 97d6736586c35484c25149932d5635b84fe66780..c006dc018ebe8ff7c18c89181fd156e8f799cf45 100644 --- a/httpbin/cmd/cmd.go +++ b/httpbin/cmd/cmd.go @@ -131,7 +131,7 @@ func (e ConfigError) Error() string { func loadConfig(args []string, getEnv func(string) string, getHostname func() (string, error)) (*config, error) { cfg := &config{} - fs := flag.NewFlagSet("", flag.ContinueOnError) + fs := flag.NewFlagSet("go-httpbin", flag.ContinueOnError) fs.BoolVar(&cfg.rawUseRealHostname, "use-real-hostname", false, "Expose value of os.Hostname() in the /hostname endpoint instead of dummy value") fs.DurationVar(&cfg.MaxDuration, "max-duration", httpbin.DefaultMaxDuration, "Maximum duration a response may take") fs.Int64Var(&cfg.MaxBodySize, "max-body-size", httpbin.DefaultMaxBodySize, "Maximum size of request or response, in bytes") diff --git a/httpbin/cmd/cmd_test.go b/httpbin/cmd/cmd_test.go index 146cfe2f2978785bf86d79f2c8ecbe8ba8e9627b..5ce96cd315cd89540f741978413b1f79705a73e8 100644 --- a/httpbin/cmd/cmd_test.go +++ b/httpbin/cmd/cmd_test.go @@ -14,7 +14,7 @@ import ( // To update, run: // make && ./dist/go-httpbin -h 2>&1 | pbcopy -const usage = `Usage: +const usage = `Usage of go-httpbin: -allowed-redirect-domains string Comma-separated list of domains the /redirect-to endpoint will allow -host string