From 688c5627b3e7883620e8e5957fb96dc5de8bff6e Mon Sep 17 00:00:00 2001 From: Will McCutchen <will@mccutch.org> Date: Sun, 13 Nov 2022 11:45:45 -0500 Subject: [PATCH] cmd: fix help output (#101) --- httpbin/cmd/cmd.go | 2 +- httpbin/cmd/cmd_test.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/httpbin/cmd/cmd.go b/httpbin/cmd/cmd.go index 97d6736..c006dc0 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 146cfe2..5ce96cd 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 -- GitLab