The Go programming language is supported.

Deploying a Go application

Version compatibility

Officially supported

  • go1.10.3 (default)
  • go1.9.7

Other versions

Any version of Go can be used from go1.0.0, but it is advised to update your application to one of the officially supported versions.

Managing dependencies

When deploying a Go application it is important to ensure that the compilation is completely reproducible, multiple tools exist in the Go ecosystem, and Scalingo is compatible with the most used among them:

Defining a Procfile

web: <base package name>

Example if your package is github.com/user/example:

web: example

Pre/Post Compile Hooks

If the file bin/go-pre-compile exists and is executable, it will be executed before compilation.

Likewise, if the file bin/go-post-compile exists and is executable, it will be executed after the compilation.

Because the buildpack installs compiled executables to bin, the go-post-compile hook can be written in go if it’s installed by the specified <packagespec> or metadata.scalingo['install'].

You can find an example at: https://github.com/Scalingo/sample-go-martini

Using .godir (Deprecated)

The alternative is to use a .godir file at the root of your project defining the name of your project binary. All the dependencies will be downloaded using go get and in this case the repeatability of the operation is not ensured.




web: my-sample

Example: https://github.com/Scalingo/sample-go-martini/tree/godir

Common questions

My application is only using the standard library, do I need Godeps or dep

Yes, Godeps and dep are not only about freezing dependencies version, it is also to save the Go runtime you’re using. We’ll install the same version as the one specified in Godeps/Godeps.json, at the key .GoVersion


	"ImportPath": "github.com/Scalingo/sample-go-maritni",
	"GoVersion": "go1.10",
	"Packages": [


More information at https://github.com/Scalingo/go-buildpack.

mode_edit Suggest edits