How to Embed Playground Snippets?

Viewed 154

Create a code block for go:

```go
package main

import "fmt"

func main() {
	fmt.Println("Hello, 世界")
}
```

This will render a playground snippet on your post:

package main

import "fmt"

func main() {
	fmt.Println("Hello, 世界")
}

Snippets run on the official go playground.

For more examples refer to the official golang playground on github.

0 Answers