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

UP Program: Clever Cloud announces its fifth startup selection

With this new batch, Clever Cloud welcomes four startups to the UP Program: Sentibee, Pictaderm, Legaia and Cockpit Agriculture.
Company

Sōzu 2.0 — turning a reverse proxy into a programmable edge

Sōzu is the reverse proxy that sits in front of every application running on Clever Cloud. After eighteen months of work — first the HTTP/2 multiplexer, built on our existing kawa pivot, then almost every other layer of the proxy, and finally a long run in production on the cleverapps.io load balancers — Sōzu 2.0 is out.
Engineering

K3s vs K8s: What Are the Differences and Which One Should You Choose in 2026?

Kubernetes has become the standard for container orchestration. But depending on your infrastructure constraints (limited resources, edge computing, IoT, or large-scale enterprise clusters), the distribution you choose can radically change the operational experience. K3s and K8s (upstream Kubernetes) address different needs, even though both share the same CNCF-certified foundation.
Engineering Features