1
0
forked from MTSR/mapserver
mapserver/server/params/params.go
2019-02-07 08:02:13 +01:00

27 lines
425 B
Go

package params
import (
"flag"
)
type ParamsType struct {
Help bool
Version bool
Debug bool
}
func Parse() ParamsType {
params := ParamsType{}
flag.BoolVar(&(params.Help), "help", false, "Show help")
flag.BoolVar(&(params.Version), "version", false, "Show version")
flag.BoolVar(&(params.Debug), "debug", false, "enable debug log")
flag.Parse()
return params
}
func PrintHelp() {
flag.PrintDefaults()
}