package main import ( "encoding/json" "net/http" "aytechnology.us/gominecraft/mod/mcping" ) func SendCommand(w http.ResponseWriter, r *http.Request) { command, _ := mv(r, "command", false) MCServer.SendCommand(command) sendJSONResponse(w, "OK") } func ServerInfo(w http.ResponseWriter, r *http.Request) { resp, _ := mcping.Ping("localhost:25565") jsonData, _ := json.Marshal(resp) sendJSONResponse(w, string(jsonData)) }