Documentation
Go Lang
Go Lang
Overview
The version of Go supported is Go 1.13.5
Each turn your source code will be compiled within a new sandbox, by default no information is shared or persisted between turns, if you wish to persist data then you should use the User Data field within the API.
Input - Standard Input (STDIN)
Within Go you can use bufio
to capture the STDIN input
reader := bufio.NewReader(os.Stdin) inputText, _ := reader.ReadString('\n')
Ouput - Standard Outout (STDOUT)
Within Go you can simply use fmt.Println()
to return your CSV based instructions to BotWars.
fmt.Println(outputCommands)
Example Bot
package main import "fmt" import "bufio" import "os" func main() { reader := bufio.NewReader(os.Stdin) inputText, _ := reader.ReadString('\n') // Go logic.... fmt.Println(outputCommands) }