Reformat examples using gofmt

This commit is contained in:
deadprogram 2013-11-13 20:47:21 -08:00
parent 7a1e5c4c8b
commit 6cd2c585b8
2 changed files with 35 additions and 35 deletions

View File

@ -1,37 +1,37 @@
package main
import (
. "gobot"
"time"
. "gobot"
"time"
)
func main() {
beaglebone := new(Beaglebone)
beaglebone.Name = "Beaglebone"
beaglebone := new(Beaglebone)
beaglebone.Name = "Beaglebone"
led := NewLed(beaglebone)
led.Driver = Driver{
Name: "led",
Pin: "P9_12",
}
led := NewLed(beaglebone)
led.Driver = Driver{
Name: "led",
Pin: "P9_12",
}
connections := []interface{} {
beaglebone,
}
devices := []interface{} {
led,
}
connections := []interface{}{
beaglebone,
}
devices := []interface{}{
led,
}
work := func(){
Every(1000 * time.Millisecond, func(){ led.Toggle() })
}
robot := Robot{
Connections: connections,
Devices: devices,
Work: work,
}
work := func() {
Every(1000*time.Millisecond, func() { led.Toggle() })
}
robot.Start()
robot := Robot{
Connections: connections,
Devices: devices,
Work: work,
}
robot.Start()
}

View File

@ -1,18 +1,18 @@
package main
import (
. "gobot"
"time"
"fmt"
"fmt"
. "gobot"
"time"
)
func main() {
robot := Robot{
Work: func(){
Every(300 * time.Millisecond, func(){ fmt.Println("Greetings human") })
},
}
robot.Start()
robot := Robot{
Work: func() {
Every(300*time.Millisecond, func() { fmt.Println("Greetings human") })
},
}
robot.Start()
}