Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

programs.go.enable

Whether to enable Go.

Type: boolean

Default:

false

Example:

true

Declared by:

programs.go.package

The go package to use.

Type: null or package

Default:

pkgs.go

Declared by:

programs.go.packages

Packages to add to GOPATH.

Type: attribute set of absolute path

Default:

{ }

Example:

{
  "golang.org/x/text" = builtins.fetchGit "https://go.googlesource.com/text";
  "golang.org/x/time" = builtins.fetchGit "https://go.googlesource.com/time";
}

Declared by:

programs.go.env

Environment variables for Go. All the available options can be found running ‘go env’.

Type: open submodule of attribute set of string

Default:

{ }

Example:

{
  GOPATH = [
    "${config.home.homeDirectory}/mygo"
    "/another/go"
    "/yet/another/go"
  ];

  GOPRIVATE = [
    "*.corp.example.com"
    "rsc.io/private"
  ];

  CXX = "g++";
  GCCGO = "gccgo";
  GOAMD64 = "v1";
  GOARCH = "amd64";
  GOAUTH = "netrc";
};

Declared by:

programs.go.env.GOPATH

List of directories that should be used by the Go tooling.

Type: string or list of string

Default:

""

Declared by:

programs.go.env.GOPRIVATE

Controls which modules the ‘go’ command considers to be private (not available publicly) and should therefore not use the proxy or checksum database.

Type: string or list of string

Default:

""

Declared by:

programs.go.telemetry

Options to configure Go telemetry mode.

Type: submodule

Default:

{ }

Declared by:

programs.go.telemetry.date

The date indicating the date at which the modefile was updated, in YYYY-MM-DD format. It’s used to reset the timeout before the next telemetry report is uploaded when telemetry mode is set to “on”.

Type: string

Default:

"1970-01-01"

Declared by:

programs.go.telemetry.mode

Go telemetry mode to be set.

Type: null or one of “off”, “local”, “on”

Default:

null

Declared by: