diff --git a/main.go b/main.go index c502089..e6852ed 100644 --- a/main.go +++ b/main.go @@ -34,6 +34,12 @@ Examples: fmt.Fprintf(flag.CommandLine.Output(), helpMsg, exeName) } + // Show help and exit if no arguments are provided + if len(os.Args) <= 1 { + flag.Usage() + os.Exit(1) + } + // Name, default val, help m := flag.String("m", "get", "Method for the request.")