Home >Backend Development >Golang >How Can I View My Go Package Documentation Locally in a Browser?
You wish to view the package documentation locally as seen on godoc.org. However, using godoc -http=:6060 only shows standard library documentation and not your own package documentation.
In GOPATH Mode:
Run godoc -http. This will serve documentation for all packages in your GOPATH, including your own. Access your package documentation by navigating to http://localhost:6060/pkg/your/package.
In Module-Aware Mode:
GOPATH and modules cannot be used together. To view module package documentation locally:
The above is the detailed content of How Can I View My Go Package Documentation Locally in a Browser?. For more information, please follow other related articles on the PHP Chinese website!