LinuxCommandLibrary
GitHubF-DroidGoogle Play Store

go-doc

display Go package and symbol documentation

TLDR

Show package documentation
$ go doc [fmt]
copy
Show function documentation
$ go doc [fmt.Println]
copy
Show all documentation
$ go doc -all [package]
copy
Show unexported symbols
$ go doc -u [package]
copy
Show source code
$ go doc -src [fmt.Println]
copy

SYNOPSIS

go doc [options] [package] [symbol]

DESCRIPTION

go doc shows documentation for Go packages and symbols. It extracts documentation from source code comments following Go documentation conventions.The command displays documentation for packages, types, functions, and methods. It can show source code and unexported symbols for development reference.

PARAMETERS

PACKAGE

Package to document.
SYMBOL
Symbol to look up.
-all
Show all documentation.
-u
Include unexported.
-src
Show source code.
-c
Case-sensitive matching.
-cmd
Treat a command (package main) like a regular package, showing its exported symbols.
-short
Print a one-line representation for each symbol.
-http
Serve HTML documentation over HTTP instead of printing to stdout.
--help
Display help information.

INSTALL

sudo zypper install go-doc
copy

CAVEATS

Reads from source, not installed docs. Standard library always available. Custom packages need source.

HISTORY

go doc is part of the Go toolchain, providing documentation access following Go's convention of documentation in source code.

SEE ALSO

go(1), godoc(1)

RESOURCES

Braincup
Open source brain training for math, memory and focus
Braincup mini-games
41 mini-games · Apache-2.0
No ads · No tracking
Play in browser
Download Braincup on the App StoreGet Braincup on Google PlayGet Braincup on F-Droid
276 stars
From the maker of Linux Command Library
Copied to clipboard
Braincup
Open source brain training for math, memory and focus. 41 mini-games, from mental arithmetic to Sudoku, N-Back and Solo Chess.
Apache-2.0 licensed · No ads · No tracking · No account
From the maker of Linux Command Library
Download Braincup on the App StoreGet Braincup on Google PlayGet Braincup on F-Droid