...
1# go doc --help
2! go doc --help
3stderr 'go doc'
4stderr 'go doc <pkg>'
5stderr 'go doc <sym>\[\.<methodOrField>\]'
6stderr 'go doc \[<pkg>\.\]<sym>\[\.<methodOrField>\]'
7stderr 'go doc \[<pkg>\.\]\[<sym>\.\]<methodOrField>'
8stderr 'go doc <pkg> <sym>\[\.<methodOrField>\]'
9
10# go help doc
11go help doc
12stdout 'go doc'
13stdout 'go doc <pkg>'
14stdout 'go doc <sym>\[\.<methodOrField>\]'
15stdout 'go doc \[<pkg>\.\]<sym>\[\.<methodOrField>\]'
16stdout 'go doc \[<pkg>\.\]\[<sym>\.\]<methodOrField>'
17stdout 'go doc <pkg> <sym>\[\.<methodOrField>\]'
18
19# go doc <pkg>
20go doc p/v2
21stdout .
22
23# go doc <pkg> <sym>
24go doc p/v2 Symbol
25stdout .
26
27# go doc <pkg> <sym> <method>
28! go doc p/v2 Symbol Method
29stderr .
30
31# go doc <pkg>.<sym>
32go doc p/v2.Symbol
33stdout .
34
35# go doc <pkg>.<sym>.<method>
36go doc p/v2.Symbol.Method
37stdout .
38
39# go doc <sym>
40go doc Symbol
41stdout .
42
43# go doc <sym> <method>
44! go doc Symbol Method
45stderr .
46
47# go doc <sym>.<method>
48go doc Symbol.Method
49stdout .
50
51# go doc <pkg>.<method>
52go doc p/v2.Method
53stdout .
54
55# go doc <pkg> <method>
56go doc p/v2 Method
57stdout .
58
59# go doc <method>
60go doc Method
61stdout .
62
63-- go.mod --
64module p/v2
65
66go 1.13
67
68-- p.go --
69package p
70
71type Symbol struct{}
72
73func (Symbol) Method() error {
74 return nil
75}
View as plain text