godirectory that contains a
srcdirectory will be the project's
GOPATHworkspace containing the project's source files and the source files for all dependencies.
.goinstallfiles that with one line of space-separated package names. This line will be passed as packages argument to the
Given a the following project file layout:
.git .gitignore .goinstall Procfile go src myapp main.go
.gitignore file should ignore items in the workspace
directories as well as any embedded VCS directories.
--- .gitignore --- # Go workspace .bzr/ .hg/ bin/ pkg/
.goinstall file content would contain the project's single package on one line:
--- .goinstall --- myapp
Profile would contain the heroku procecess type and command. See
--- Profile --- web: myapp
You would run the following command to create a heroku app that uses this buildpack:
$ heroku apps:create myapp --buildpack https://github.com/fuseelements/heroku-buildpack-go.git
To deploy the app to heroku:
$ git push heroku master ... -----> Fetching custom git buildpack... done -----> Go project app detected -----> Installing Go 1.1.2... done -----> Running: go install -tags heroku myapp -----> Discovering process types Procfile declares types -> web -----> Compiled slug size: 1.2MB -----> Launching... done, v4 http://myapp.herokuapp.com deployed to Heroku
Copy the snippet above into CLI.