Go apps are supported on Flynn by the Go buildpack.
The Go buildpack is used if the repository contains any filenames ending with
The Go buildpack allows you to specify and install your dependencies using
godep, which saves application dependencies into the git repo so that the
application can be reproducibly deployed.
To save dependencies using godep, run
save in your app directory and commit the
When you deploy to Flynn, the packages in the
Godeps directory will be used.
§ Go Version
When you use
GoVersion property in the
is used to specify the Go version.
If you do not use
godep, the latest version of Go known by the buildpack will
All main packages in the repo are compiled and binaries placed in the
directory, which is in the
PATH. Binaries are named after the directory that
If the root of the repo contains a main package, the binary name
is derived from the package path. The path is read from the
Godeps/Godeps.json if you are using
godep, or the
.godir file if you
§ Process Types
The process types your app supports are declared in a
Procfile in the root
directory, which contains one line per type in the format
For example: if you have a main package in the root of your repository, and the
package path is
github.com/flynn/myserver, the binary will be named
myserver, and you should have something like this in your
web process type has an HTTP route by default and a corresponding
environment variable that the server should listen on.