go doc
Show documentation for a package or symbol. More information: https://golang.org/cmd/go/#hdr-Show_documentation_for_package_or_symbol.
-
Show documentation for the current package:
go doc
-
Show package documentation and exported symbols:
go doc {{encoding/json}}
-
Show also documentation of symbols:
go doc -all {{encoding/json}}
-
Show also sources:
go doc -all -src {{encoding/json}}
-
Show a specific symbol:
go doc -all -src {{encoding/json.Number}}
License and Disclaimer
The content on this page is copyright © 2014—present the tldr-pages team and contributors.This page is used with permission under Creative Commons Attribution 4.0 International License.
While we do attempt to make sure content is accurate, there isn't a warranty of any kind.