Forrest logo
back to context overview

go-build

List of commands for go-build:

  • go-build:tldr:2feec go-build: Compile a 'package main' file (output will be the filename without extension).
    $ go build ${path-to-main-go}
    try on your machine
    explain this command
  • go-build:tldr:f62b7 go-build: Compile, specifying the output filename.
    $ go build -o ${path-to-binary} ${path-to-source-go}
    try on your machine
    explain this command
  • go-build:tldr:fe1db go-build: Compile a main package into an executable, enabling data race detection.
    $ go build -race -o ${path-to-executable} ${path-to-main-package}
    try on your machine
    explain this command
back to context overview