mapserver/main.go
2019-01-07 08:56:02 +01:00

34 lines
424 B
Go

package main
import (
"mapserver/params"
"mapserver/worldconfig"
"flag"
"fmt"
)
var (
Version string
)
func main() {
p := params.Parse()
if p.Help {
flag.PrintDefaults()
return
}
if p.Version {
fmt.Print("Mapserver version: ")
if Version == "" {
Version = "SNAPSHOT"
}
fmt.Println(Version)
return
}
worldcfg := worldconfig.Parse(p.Worlddir + "world.mt")
fmt.Println("Config ", worldcfg)
}