Skip to content

Commit

Permalink
Fix example in README.md
Browse files Browse the repository at this point in the history
The example will not run because `gomotion.GetDevice` returns two things.
  • Loading branch information
eddiezane committed Feb 8, 2014
1 parent af7ff9f commit 1d1de75
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,10 @@ import (
func main() {
// Get a device.
runtime.GOMAXPROCS(runtime.NumCPU())
device := gomotion.GetDevice("ws://127.0.0.1:6437/v3.json")
device, err := gomotion.GetDevice("ws://127.0.0.1:6437/v3.json")
if err != nil {
log.Fatal(err)
}
device.Listen()
defer device.Close()
for frame := range device.Pipe {
Expand Down

0 comments on commit 1d1de75

Please sign in to comment.