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