mirror of
https://github.com/hybridgroup/gobot.git
synced 2025-04-27 13:48:56 +08:00

Make all examples to not be built by default by adding the build tag 'example'. Some files were automatically reformatted by goimports upon saving.
23 lines
269 B
Go
23 lines
269 B
Go
// +build example
|
|
//
|
|
// Do not build by default.
|
|
|
|
package main
|
|
|
|
import (
|
|
"fmt"
|
|
"time"
|
|
|
|
"gobot.io/x/gobot"
|
|
)
|
|
|
|
func main() {
|
|
robot := gobot.NewRobot(
|
|
func() {
|
|
gobot.Every(500*time.Millisecond, func() { fmt.Println("Greetings human") })
|
|
},
|
|
)
|
|
|
|
robot.Start()
|
|
}
|