go-source

A golang source library

BSD-2-CLAUSE License

Stars
16
Committers
1

Source Go Report Card License GoDoc Build Status

go-source is a Go client for the Source RCON Protocol.

Features

Supports

Installation

go get -u github.com/multiplay/go-source

Examples

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)
	}
}

Documentation

License

go-source is available under the BSD 2-Clause License.