mirror of
https://github.com/golang/go.git
synced 2025-05-05 15:43:04 +00:00
Use highlighting for Go code (it was there on the previous wiki).
parent
b08328e655
commit
47f767af94
@ -9,7 +9,7 @@ to use correctly.
|
||||
|
||||
Russ Cox presented a good solution for this problem in this [thread](https://groups.google.com/d/msg/golang-nuts/IiWZ2hUuLDA/SNKYYZBelsYJ).
|
||||
|
||||
```
|
||||
```Go
|
||||
package sdl
|
||||
|
||||
// Arrange that main.main runs on main thread.
|
||||
@ -42,7 +42,8 @@ func do(f func()) {
|
||||
```
|
||||
|
||||
And then other functions you write in package sdl can be like
|
||||
```
|
||||
|
||||
```Go
|
||||
func Beep() {
|
||||
do(func() {
|
||||
// whatever must run in main thread
|
||||
|
Loading…
x
Reference in New Issue
Block a user