Skip to content

Commit d32177e

Browse files
author
Xavier Godart
committed
fix go example
1 parent 68a645e commit d32177e

1 file changed

Lines changed: 3 additions & 5 deletions

File tree

content/runal.md

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -133,19 +133,17 @@ import (
133133
)
134134
135135
func main() {
136-
runal.Run(context.Background(), setup, draw, onKey)
136+
runal.Run(context.Background(), setup, draw, onKey, onMouse)
137137
}
138138
139139
func setup(c *runal.Canvas) {}
140140
141141
func draw(c *runal.Canvas) {}
142-
```
143142
144-
You can add extra methods `onKey` and `onMouse` to catch keyboard and mouse events:
145-
```go
143+
// You can add extra methods `onKey` and `onMouse` to catch keyboard and mouse events
146144
func onKey(c *runal.Canvas, e runal.KeyEvent) {}
147145
func onMouse(c *runal.Canvas, e runal.MouseEvent) {}
148-
````
146+
```
149147

150148
And you can then execute the file with:
151149
```sh

0 commit comments

Comments
 (0)