Go Concepts - Documentation: Difference between revisions
Jump to navigation
Jump to search
Line 9: | Line 9: | ||
=Reading Documentation= | =Reading Documentation= | ||
To read the package summary: | |||
<pre> | |||
go doc <package-name> | |||
</pre> | |||
To get the documentation for a package identifier (function name, type, etc): | |||
<pre> | |||
go doc <package-name> <identifier> | |||
</pre> | |||
=Package= | =Package= |
Revision as of 00:50, 2 April 2016
Internal
Overview
Go generates in-line documentation for symbols in packages, via the go doc command.
Reading Documentation
To read the package summary:
go doc <package-name>
To get the documentation for a package identifier (function name, type, etc):
go doc <package-name> <identifier>
Package
go doc <package>
Function
go doc <package> <function-name>
Example:
go doc fmt Println