diff --git a/x/examples/outline-connectivity/main.go b/x/examples/outline-connectivity/main.go index 3dbb1f56..7bca19c7 100644 --- a/x/examples/outline-connectivity/main.go +++ b/x/examples/outline-connectivity/main.go @@ -19,10 +19,12 @@ import ( "encoding/json" "errors" "flag" + "fmt" "io" "log" "net" "os" + "path" "strings" "time" @@ -83,12 +85,19 @@ func unwrapAll(err error) error { } } +func init() { + flag.Usage = func() { + fmt.Fprintf(flag.CommandLine.Output(), "Usage: %s [flags...]\n", path.Base(os.Args[0])) + flag.PrintDefaults() + } +} + func main() { verboseFlag := flag.Bool("v", false, "Enable debug output") transportFlag := flag.String("transport", "", "Transport config") domainFlag := flag.String("domain", "example.com.", "Domain name to resolve in the test") resolverFlag := flag.String("resolver", "8.8.8.8,2001:4860:4860::8888", "Comma-separated list of addresses of DNS resolver to use for the test") - protoFlag := flag.String("proto", "tcp,udp", "Comma-separated list of the protocols to test. Muse be \"tcp\", \"udp\", or a combination of them") + protoFlag := flag.String("proto", "tcp,udp", "Comma-separated list of the protocols to test. Must be \"tcp\", \"udp\", or a combination of them") flag.Parse() if *verboseFlag {