go-source is a Go client for the Source RCON Protocol.
- Full Source RCON Support.
- Multi-Packet Responses Support.
- Valve Counter-Strike Global Offensive and others.
- Mojang Minecraft.
- Chucklefish Starbound.
go get -u github.com/multiplay/go-source
Using go-source is simple just create a client, login and then send commands e.g.
package main
import (
"log"
"github.com/multiplay/go-source"
)
func main() {
c, err := source.NewClient("192.168.1.102:27015", source.Password("mypass"))
if err != nil {
log.Fatal(err)
}
defer c.Close()
if s, err := c.Exec("status"); err != nil {
log.Fatal(err)
} else {
log.Println("server status:", s)
}
}
go-source is available under the BSD 2-Clause License.