Go task

Azure Pipelines

Use this task in a build or release pipeline to get, build, or test a go application, or run a custom go command.

YAML snippet

# Go
# Get, build, or test a Go application, or run a custom Go command.
- task: Go@0
    #command: 'get' # Options: get, build, test, custom
    #customCommand: # Required when command == Custom
    #arguments: # Optional


Command(Required) Select a Go command to run. Select 'Custom' to use a command not listed here.
Custom command(Required) Custom Go command for execution. For example: to execute go version, enter version.
Arguments(Optional) Arguments to the selected command. For example, build time arguments for go build command.
Working Directory(Required) Current working directory where the script is run. Empty is the root of the repo (build) or artifacts (release), which is $(System.DefaultWorkingDirectory)
Control options

Open source

This task is open source on GitHub. Feedback and contributions are welcome.

Q & A