forked from MTSR/mapserver
params
This commit is contained in:
parent
703abda2f0
commit
e4ca34696e
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
||||
mapserver
|
9
main.go
Normal file
9
main.go
Normal file
@ -0,0 +1,9 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"mapserver/params"
|
||||
)
|
||||
|
||||
func main(){
|
||||
params.Parse()
|
||||
}
|
23
params/params.go
Normal file
23
params/params.go
Normal file
@ -0,0 +1,23 @@
|
||||
package params
|
||||
|
||||
import (
|
||||
"flag"
|
||||
"fmt"
|
||||
)
|
||||
|
||||
type ParamsType struct {
|
||||
worlddir string
|
||||
}
|
||||
|
||||
var params ParamsType
|
||||
|
||||
func Params() ParamsType {
|
||||
return params
|
||||
}
|
||||
|
||||
func Parse(){
|
||||
params := ParamsType{}
|
||||
flag.StringVar(&(params.worlddir), "worlddir", "./", "world directory")
|
||||
flag.Parse()
|
||||
fmt.Println("World dir is: ", params.worlddir)
|
||||
}
|
0
util/worldconfig.go
Normal file
0
util/worldconfig.go
Normal file
Loading…
Reference in New Issue
Block a user