diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..24c8b58 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +mapserver \ No newline at end of file diff --git a/main.go b/main.go new file mode 100644 index 0000000..0db9327 --- /dev/null +++ b/main.go @@ -0,0 +1,9 @@ +package main + +import ( + "mapserver/params" +) + +func main(){ + params.Parse() +} \ No newline at end of file diff --git a/params/params.go b/params/params.go new file mode 100644 index 0000000..be17f6d --- /dev/null +++ b/params/params.go @@ -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) +} \ No newline at end of file diff --git a/util/worldconfig.go b/util/worldconfig.go new file mode 100644 index 0000000..e69de29