Home >Backend Development >Golang >How to install godoc
The following tutorial column will introduce how to install godoc. I hope it will be helpful to friends who need it!
##Enable Go Modules function
go env -w GO111MODULE=onConfigure the GOPROXY environment variable, choose one of the following three
1. 七牛 CDN go env -w GOPROXY=https://goproxy.cn,direct # 2. 阿里云 go env -w GOPROXY=https://mirrors.aliyun.com/goproxy/,direct # 3. 官方 go env -w GOPROXY=https://goproxy.io,directExecute the following command
go get golang.org/x/tools/cmd/godocAfter successful execution, the godoc file will be generated in the go/bin directory Execute the following command
godoc -http=:6060
Access the local link to view the document
localhost:6060
The above is the detailed content of How to install godoc. For more information, please follow other related articles on the PHP Chinese website!