Skip to content

Commit aafdb1d

Browse files
authored
Merge pull request astaxie#1112 from jonaustin/patch-1
update godoc -> go doc for cli output
2 parents 606abd5 + 9e1b5b5 commit aafdb1d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

en/01.3.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -79,11 +79,11 @@ This command loads all files whose name include `*_test.go` and generates test f
7979

8080
It tests all your test files by default. Use command `go help testflag` for more details.
8181

82-
## godoc
82+
## go doc & godoc
8383

8484
Many people say that we don't need any third-party documentation for programming in Go (actually I've made a [CHM](https://github.com/astaxie/godoc) already). Go has a powerful tool to manage documentation natively.
8585

86-
So how do we look up package information in documentation? For instance, if you want to get more details about the `builtin` package, use the `godoc builtin` command. Similarly, use the `godoc net/http` command to look up the `http` package documentation. If you want to see more details about specific functions, use the `godoc fmt Printf` and `godoc -src fmt Printf` commands to view the source code.
86+
So how do we look up package information in documentation? For instance, if you want to get more details about the `builtin` package, use the `go doc builtin` command. Similarly, use the `go doc net/http` command to look up the `http` package documentation. If you want to see more details about specific functions, use the `go doc fmt.Printf` and `go doc -src fmt.Printf` commands to view the source code.
8787

8888
Execute the `godoc -http=:8080` command, then open `127.0.0.1:8080` in your browser. You should see a localized golang.org. It can not only show the standard packages' information, but also packages in your `$GOPATH/pkg`. It's great for people who are suffering from the Great Firewall of China.
8989

0 commit comments

Comments
 (0)