Home  >  Article  >  Backend Development  >  How to install godoc

How to install godoc

藏色散人
藏色散人forward
2021-04-21 09:20:582569browse

The following tutorial column will introduce how to install godoc. I hope it will be helpful to friends who need it!

How to install godoc                                                                                                                

##Enable Go Modules function

go env -w GO111MODULE=on
Configure 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,direct
Execute the following command
go get golang.org/x/tools/cmd/godoc
After 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!

Statement:
This article is reproduced at:learnku.com. If there is any infringement, please contact admin@php.cn delete