/go-binfmt

go-binfmt registers Go language .go files with binfmt which allows you to run Go files directly.

Primary LanguageGo

Install go-binfmt.

$ go get github.com/str1ngs/go-binfmt

To use go-binfmt first register it with binfmt.

$ sudo $GOPATH/bin/go-binfmt -register

To run a go file give it executable permissions, and then run it.

$ chmod +x main.go
$ ./main.go