Install run go get github.com/anasanzari/factorial Example Program In the folder $GOPATH/src/github.com/anasanzari/factorial there is a subfolder example. Run it with go build example.go