Go provides a easy to use environment to test simple Go code. It is called playground.

For example the below hello world program can be executed in Go playground.

package main

import (
    "fmt"
)

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

Here is the playground