3 ms·
You do not need any of this. You can use `go run` with a source file outside the GOPATH. Put the following in a file, make it executable and execute it: ///u
by majewsky 9y ago
You do not need any of this. You can use `go run` with a source file outside the GOPATH. Put the following in a file, make it executable and execute it:
///usr/bin/env go run "$0" "$@"; exit $?
package main
import "fmt"
func main() {
fmt.Println("Hello World")
}
- weberc2 9y agoMy point was to show that GOPATH is easy; not the fastest path to hello world. :)