Build your Golang code with Go Modules

go modules 1

You can now build your go projects with go modules! Please take a look at our Go modules documentation.

At the begining of Go's adoption, the build tools available were goinstall and then go get. It worked simply, but versioning was not managed. Developers started vendoring libs, it started to be a bit messy. The Go community addressed this problem with different third-party builds and dependencies management tools. And then came the official answer from the Go team: Go Modules. And we support it on Clever Cloud \o/.

How to Deploy

The default build tool is still go get. So to choose go modules you will need the following environment variable: CC_GO_BUILD_TOOL=gomod

Please make sure your go.mod file is at the root of your repository alongside main.go. If you have a different entrypoint you can specify it with the environment variable CC_GO_PKG=./path/to/entrypoint.go

If you follow those two advices, everything should go well and you will have your deployed go application on Clever Cloud. We hope you will enjoy using it. Please let us know if you have any other suggestions to make our golang support better.

Happy coding!

Blog

À lire également

Cloud modernisation: how to align governance and operations without adding complexity

European organisations are managing increasingly heterogeneous environments: legacy applications, cloud-native services, multi-cloud setups and regulatory constraints are accumulating within information systems rarely designed to handle such diversity.
Engineering Event Guests

Clever Cloud launches Clever Kubernetes Engine (CKE) in public beta on April 27, 2026

Previewed at Devoxx starting April 22, CKE is the culmination of two years of R&D built around a complete reimplementation of Kubernetes.
Company Engineering Press

The DEEP, OVHcloud and Clever Cloud consortium selected to deliver sovereign cloud services for European institutions

Paris – April 17, 2026 – The consortium composed of DEEP by POST Luxembourg Group, OVHcloud and Clever Cloud today announces its selection by the European Commission as part of a major procurement framework to provide sovereign cloud services to the institutions, bodies and agencies of the European Union. This contract, with a ceiling of €180 million over six years, marks a significant milestone in the concrete implementation of Europe’s digital sovereignty strategy.
Company