The godoc webserver is no longer included in the main binary distribution. To run the godoc webserver locally, manually install it first:

go get golang.org/x/tools/cmd/godoc
godoc
The godoc webserver is no longer included in the main binary distribution. To run the godoc webserver locally, manually install it first:

go get golang.org/x/tools/cmd/godoc
godoc
If a require directive in the main module uses an invalid pseudo-version, it can usually be corrected by redacting the version to just the commit hash and re-running a go command, such as go list -m all or go mod tidy. For example,

require github.com/docker/docker v1.14.0-0.20190319215453-e7b5f7dbe98c
If one of the transitive dependencies of the main module requires an invalid version or pseudo-version, the invalid version can be replaced with a valid one using a replace directive in the go.mod file of the main module. If the replacement is a commit hash, it will be resolved to the appropriate pseudo-version as above. For example,

replace github.com/docker/docker v1.14.0-0.20190319215453-e7b5f7dbe98c => github.com/docker/docker e7b5f7dbe98c
can be redacted to

require github.com/docker/docker e7b5f7dbe98c
which currently resolves to

require github.com/docker/docker v0.7.3-0.20190319215453-e7b5f7dbe98c
currently resolves to

replace github.com/docker/docker v1.14.0-0.20190319215453-e7b5f7dbe98c => github.com/docker/docker v0.7.3-0.20190319215453-e7b5f7dbe98c
Users who cannot reach the default proxy and checksum database (for example, due to a firewalled or sandboxed configuration) may disable their use by setting GOPROXY to direct, and/or GOSUMDB to off. go env -w can be used to set the default values for these variables independent of platform:

go env -w GOPROXY=direct
go env -w GOSUMDB=off
A new tool is available for dynamic execution tracing of Go programs. The usage is analogous to how the test coverage tool works. Generation of traces is integrated into go test, and then a separate execution of the tracing tool itself analyzes the results:

$ go test -trace=trace.out path/to/package
$ go tool trace [flags] pkg.test trace.out
For example, to build and link a program on amd64 for Darwin using the tools directly, rather than through go build, one would run:

$ export GOOS=darwin GOARCH=amd64
$ go tool compile program.go
$ go tool link program.o
Because of this change, values of the affected types need to be zero-initialized with the constant 0 instead of the constant nil. Go 1.10 provides gofix modules to help with that rewrite:

go tool fix -r cftype <pkg>
go tool fix -r jni <pkg>

Recommend

Go 1.13 Release Notes Tools Modules Version validation

Go 1.13 Release Notes Tools Modules Environment variables

Go 1 Release Notes Minor changes to the library The url package

Go 1 Release Notes Minor changes to the library The testing package

Go 1 Release Notes Minor changes to the library The path/filepath package

Go 1 Release Notes Minor changes to the library The os/signal package

Go 1 Release Notes Minor changes to the library The os package The os.FileInfo type

Go 1 Release Notes Minor changes to the library The go/* packages

Go 1 Release Notes Minor changes to the library The flag package

Go 1 Release Notes Major changes to the library Time

Go 1 Release Notes Major changes to the library The error type and errors package

Go 1 Release Notes Changes to the language Equality

Go 1 Release Notes Changes to the language Copying structs with unexported fields

Go 1 Release Notes Changes to the language Returns and shadowed variables

Go 1 Release Notes Changes to the language Multiple assignment

Go 1 Release Notes Changes to the language Iterating in maps

Go 1 Release Notes Changes to the language Deleting from maps

Go 1 Release Notes Changes to the language The error type

Go 1 Release Notes Changes to the language The rune type

Go 1 Release Notes Changes to the language Goroutines during init

Go 1 Release Notes Changes to the language Composite literals

Go 1 Release Notes Changes to the language Close

Go 1 Release Notes Changes to the language Append

Go 1.6 Release Notes Core library Templates

Go 1.6 Release Notes Core library Reflect

Go 1.6 Release Notes Tools Compiler Toolchain

Go Fuzzing Corpus file format

Go Fuzzing Running fuzz tests Custom settings

Go Fuzzing Running fuzz tests Failing input

Go Fuzzing Running fuzz tests Command line output

A Quick Guide to Go's Assembler Architecture-specific details Unsupported opcodes

A Quick Guide to Go's Assembler Architecture-specific details 64-bit Intel 386 (a.k.a. amd64)

A Quick Guide to Go's Assembler Architecture-specific details 32-bit Intel 386

A Quick Guide to Go's Assembler Architecture-specific details

A Quick Guide to Go's Assembler A Quick Guide to Go's Assembler Interacting with Go types and constants

A Quick Guide to Go's Assembler A Quick Guide to Go's Assembler Directives

A Quick Guide to Go's Assembler A Quick Guide to Go's Assembler Symbols

A Quick Guide to Go's Assembler A Quick Guide to Go's Assembler

Managing Go installations Uninstalling Go Windows

Managing Go installations Installing multiple Go versions

Go 1.10 Release Notes Core library Minor changes to the library

Go 1.10 Release Notes Tools Doc

Go 1.10 Release Notes Tools Cgo

Go 1.1 Release Notes Changes to the standard library Exp and old subtrees moved to go.exp and go.text subrepositories

Go 1.1 Release Notes Changes to the standard library bufio.Scanner

Go 1.1 Release Notes Changes to the implementations and tools Build constraints

Go 1.1 Release Notes Changes to the implementations and tools Changes to the go test command

Go 1.1 Release Notes Changes to the implementations and tools Changes to the go command

Go 1.1 Release Notes Changes to the implementations and tools Unicode

Go 1.1 Release Notes Changes to the implementations and tools Size of int on 64-bit platforms

Go 1.1 Release Notes Changes to the language Method values

Go 1.1 Release Notes Changes to the language Integer division by zero

Go 1.8 Release Notes Changes to the language

Go 1.2 Release Notes Changes to the standard library The text/template and html/template packages

Go 1.2 Release Notes Changes to the standard library The fmt package

Go 1.2 Release Notes Changes to the implementations and tools The go doc command is deleted

Go 1.2 Release Notes Changes to the implementations and tools Test coverage

Go 1.2 Release Notes Changes to the implementations and tools Godoc and vet moved to the go.tools subrepository

Go 1.2 Release Notes Changes to the language Three-index slices

Go 1.2 Release Notes Changes to the language Use of nil