From 25535c99e9e05a471eba72b3b9419a5f0ece561e Mon Sep 17 00:00:00 2001 From: deadprogram Date: Wed, 13 Nov 2013 20:50:22 -0800 Subject: [PATCH] Proper formatting for README example --- README.md | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index abeeb169..e8731413 100644 --- a/README.md +++ b/README.md @@ -17,6 +17,7 @@ Then install additional libraries for whatever hardware support you want to use ```go package main + import ( "github.com/hybridgroup/gobot" "github.com/hybridgroup/gobot-sphero" @@ -31,23 +32,23 @@ func main() { sphero := gobotSphero.NewSphero(spheroAdaptor) sphero.Name = "Sphero" - connections := []interface{} { + connections := []interface{}{ spheroAdaptor, } - devices := []interface{} { + devices := []interface{}{ sphero, } - work := func(){ - gobot.Every("2s", func(){ - sphero.Roll(100, uint16(gobot.Random(0, 360))) + work := func() { + gobot.Every("2s", func() { + sphero.Roll(100, uint16(gobot.Random(0, 360))) }) } - + robot := gobot.Robot{ - Connections: connections, - Devices: devices, - Work: work, + Connections: connections, + Devices: devices, + Work: work, } robot.Start()