Update flags
This commit is contained in:
parent
4b62cad6bd
commit
53862c4cb0
|
@ -19,13 +19,13 @@ type serverData struct {
|
||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
|
|
||||||
serverAddr := flag.String("serverAddr", "factorio.blackolivepineapple.pizza", "Server to check status of (optional, defaults to factorio.bopp")
|
serverAddr := flag.String("serverAddr", "localhost", "Server to check status of (optional; defaults to localhost")
|
||||||
serverPort := flag.Int("serverport", 34196, "RCON port on the Factorio server")
|
serverPort := flag.Int("serverPort", 34196, "RCON port on the Factorio server (optional; defaults to 34196)")
|
||||||
password := flag.String("password", "", "RCON password of the server (required)")
|
password := flag.String("password", "", "RCON password of the server (required)")
|
||||||
flag.Parse()
|
flag.Parse()
|
||||||
|
|
||||||
if *port < 1 || *port > 65535 {
|
if *serverPort < 1 || *serverPort > 65535 {
|
||||||
fmt.Printf("Invalid port %v\n", *port)
|
fmt.Printf("Invalid server port %v\n", *serverPort)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -69,7 +69,7 @@ func main() {
|
||||||
t.Execute(w, data)
|
t.Execute(w, data)
|
||||||
})
|
})
|
||||||
|
|
||||||
fmt.Printf("Serving on :%v...\n", *port)
|
fmt.Println("Serving...")
|
||||||
http.ListenAndServe(fmt.Sprintf(":%v", *port), nil)
|
http.ListenAndServe(":http", nil)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue