./mapserver -createconfig
This commit is contained in:
parent
ca58abe930
commit
419844e4ec
@ -52,6 +52,11 @@ func main() {
|
||||
panic(err)
|
||||
}
|
||||
|
||||
//exit after creating the config
|
||||
if p.CreateConfig {
|
||||
return
|
||||
}
|
||||
|
||||
//setup app context
|
||||
ctx := app.Setup(p, cfg)
|
||||
|
||||
|
@ -5,9 +5,10 @@ import (
|
||||
)
|
||||
|
||||
type ParamsType struct {
|
||||
Help bool
|
||||
Version bool
|
||||
Debug bool
|
||||
Help bool
|
||||
Version bool
|
||||
Debug bool
|
||||
CreateConfig bool
|
||||
}
|
||||
|
||||
func Parse() ParamsType {
|
||||
@ -16,6 +17,7 @@ func Parse() 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.BoolVar(&(params.CreateConfig), "createconfig", false, "creates a config and exits")
|
||||
flag.Parse()
|
||||
|
||||
return params
|
||||
|
Loading…
Reference in New Issue
Block a user