Create a file, for example say file.go , and its contents should look like this:
///path-to/bin/go run $0 $@ ; exit $? package main func main() { println("Hello World!") }
Then run chmod +x file.go and then you can execute it as ./file.go p1 p2 .
Change This works on Ubuntu. I have not seen that OSX is in question.
Kaveh shahbazian
source share