Home > Backend Development > Golang > How to install godoc

How to install godoc

藏色散人
Release: 2021-04-21 09:21:17
forward
2590 people have browsed it

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
Copy after login
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
Copy after login
Execute the following command
go get golang.org/x/tools/cmd/godoc
Copy after login
After successful execution, the godoc file will be generated in the go/bin directory Execute the following command
godoc -http=:6060
Copy after login

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!

Related labels:
source:learnku.com
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template