Пример компиляции приложения Golang
$ cd ~/tmp/
$ vi ./main.go
package main
import (
"fmt"
"net/http"
)
func main() {
http.HandleFunc("/", func(w http.ResponseWriter, r *http.Request) {
fmt.Fprintln(w, "Hello, world!")
})
http.ListenAndServe(":3000", nil)
}
$ curl localhost:3000
Hello, world!
^C
$ go build ./main.go
$ ./main
$ curl localhost:3000
Hello, world!