demo-web-service-go/main.go

18 lines
293 B
Go
Raw Permalink Normal View History

2021-09-14 12:24:35 +03:00
package main
import (
2021-09-14 13:02:03 +03:00
"os"
2021-09-14 12:24:35 +03:00
2021-09-14 13:02:03 +03:00
"github.com/Neur0toxine/demo-web-service-go/cmd"
"github.com/jessevdk/go-flags"
2021-09-14 12:24:35 +03:00
)
func main() {
2021-09-14 13:02:03 +03:00
if _, err := cmd.Parser.Parse(); err != nil {
if flagsErr, ok := err.(*flags.Error); ok && flagsErr.Type == flags.ErrHelp {
os.Exit(0)
}
os.Exit(-1)
2021-09-14 12:24:35 +03:00
}
}