diff --git a/utils/usage.go b/utils/usage.go deleted file mode 100644 index d6f52a5..0000000 --- a/utils/usage.go +++ /dev/null @@ -1,12 +0,0 @@ -package utils - -import ( - "flag" - "os" -) - -// Usage displays possible arguments -func Usage() { - flag.PrintDefaults() - os.Exit(1) -} diff --git a/utils/flags.go b/utils/utils.go similarity index 57% rename from utils/flags.go rename to utils/utils.go index b76ea73..e252920 100644 --- a/utils/flags.go +++ b/utils/utils.go @@ -1,10 +1,20 @@ package utils -import "flag" +import ( + "flag" + "os" +) +// Flags configure flag management func Flags(host *string, port *string) { flag.Usage = Usage flag.StringVar(host, "host", "[::]", "Listen host") flag.StringVar(port, "port", "8080", "Listen port") flag.Parse() } + +// Usage displays possible arguments +func Usage() { + flag.PrintDefaults() + os.Exit(1) +}