1
0
forked from MTSR/mapserver
mapserver/server/params/params.go
NatureFreshMilk d2e4f03f82 folder rename
2019-01-23 08:46:32 +01:00

28 lines
451 B
Go

package params
import (
"flag"
)
type ParamsType struct {
Help bool
Version bool
Debug bool
Dumpconfig 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()
}