func main() { master := gobot.GobotMaster() gobot.Api(master) hello := new(gobot.Robot) hello.Name = "hello" hello.Commands = map[string]interface{}{"Hello": Hello} master.Robots = append(master.Robots, *hello) master.Start() }
func main() { master := gobot.GobotMaster() api := gobot.Api(master) api.Username = "******" api.Password = "******" hello := new(gobot.Robot) hello.Name = "hello" hello.Commands = map[string]interface{}{"Hello": Hello} master.Robots = append(master.Robots, hello) master.Start() }