- Configure Your Project
- Docker Configuration
- Start Tasks
- VS Code Extensions
- Exposing Ports
- Prebuilt Workspaces
- Environment Variables
- Workspace Location
- Editor Configuration
- Gitpod Self-Hosted
- Install on Google Cloud Platform
- Install on Amazon Web Services
- Install on self-managed Kubernetes
- Configure OAuth
- Configure a Domain
- Configure HTTPS Certificates
- Configure a Database
- Configure a Docker Registry
- Configure Storage
- Configure Nodes
- Configure Workspaces
- Languages & Frameworks
Older Go projects without module support need a specific workspace layout: the source code of your repository and its dependencies must be in the directories
$GOPATH. Using the
.gitpod.yml file, you can bring about such a workspace layout. Here is
how we do that for the example
... checkoutLocation: "go/src/github.com/demo-apps/go-gin-app" workspaceLocation: "." tasks: - command: | cd /workspace/go/src/github.com/demo-apps/go-gin-app go get -v ./... go build -o app ./app
In more detail:
- By default, Gitpod clones the repository into the directory
/workspace, which becomes the root directory for the workspace. With
workspaceLocationyou can change this behavior (the paths are taken relative to
- Gitpod preconfigures the
$GOPATHenvironment variable to include the directory
go get -v ./...we retrieve the sources of the dependencies from GitHub.
- To build the app, we run
go build -o app.
- Lastly, we start the application.
Still Have Questions?
Please reach out. We’re happy to answer them.