从Shell脚本运行Golang脚本

I'm trying to run my golang program whenever I log into OSX. I'm trying the following script with Automator:

#!/bin/sh
export GOPATH=/Volumes/DTSE9/worker
go run /Volumes/worker/worker.go

Whenever I run this with Automator, it tells me go: command not found

Create a file like say file.go and it's content should look like:

///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.

Edit: This works on Ubuntu. I did not saw that OSX was in question.