...

/

Accessing Go Documentation

Accessing Go Documentation

Let’s learn about the go doc and godoc utilities.

The go doc and godoc utilities

The Go distribution comes with a plethora of tools that can make our lives as programmers easier. Two of these tools are the go doc subcommand and the godoc utility, which allow us to see the documentation of existing Go functions and packages without needing an internet connection. We can also view the Go documentation online. Because godoc is not installed by default, we might need to install it by running go get golang.org/x/tools/cmd/godoc. ...