Go

We set the GOPATH to ${HOME} and checkout your code into

${HOME}/src/github.com/GITHUB_USER_NAME/GITHUB_REPOSITORY_NAME

Version

We have Go 1.4 installed by default in our virtual machine. To change to another Go version, use this script in your Setup Commands.

Dependency management

You can install dependencies with:

go get

To also install test dependencies, use the following command instead

go get -t -v ./...

Testing

You can run your tests with:

go test -v

You can of course use different test frameworks as well, for example gocheck

go get launchpad.net/gocheck
go test -gocheck.v

Build

You can build your Go project with

go build

Need More Help?

Get in touch if you need more help, or post on Stack Overflow using the tag #Codeship.

  • Ask The Helpdesk A Question
  • Code Examples And Sample Projects
    • Was This Article Helpful?