File: golang-guru.1

package info (click to toggle)
golang-golang-x-tools 1%3A0.5.0%2Bds-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bookworm-backports
  • size: 16,592 kB
  • sloc: javascript: 2,011; asm: 1,635; sh: 192; yacc: 155; makefile: 52; ansic: 8
file content (143 lines) | stat: -rw-r--r-- 3,319 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
.\"                                      Hey, EMACS: -*- nroff -*-
.de Vb \" Begin verbatim text
.ft CW
.nf
.ne \\$1
..
.de Ve \" End verbatim text
.ft R
.fi
..
.TH GOLANG-GURU 1 "2016-10-31"
.\" Please adjust this date whenever revising the manpage.
.SH NAME
golang-guru \- Go source code guru

.SH SYNOPSIS
.B golang-guru
.RI [
.IR "flag ..."
.RI ]
.RI mode
.RI position

.SH DESCRIPTION

The mode argument determines the query to perform:

.TP 14
.B callees
show possible targets of selected function call
.TP 14
.B callers
show possible callers of selected function
.TP 14
.B callstack
show path from callgraph root to selected function
.TP 14
.B definition
show declaration of selected identifier
.TP 14
.B describe
describe selected syntax: definition, methods, etc
.TP 14
.B freevars
show free variables of selection
.TP 14
.B implements
show 'implements' relation for selected type or method
.TP 14
.B peers
show send/receive corresponding to selected channel op
.TP 14
.B pointsto
show variables the selected pointer may point to
.TP 14
.B referrers
show all refs to entity denoted by selected identifier
.TP 14
.B what
show basic information about the selected syntax node
.TP 14
.B whicherrs
show possible values of the selected error variable

.PP
The position argument specifies the filename and byte offset (or range)
of the syntax element to query.  For example:

.Vb 6
\&	foo.go:#123,#128
\&	bar.go:#123
.Ve

.PP
The user manual is available here:  http://golang.org/s/using-guru

.SH OPTIONS

.TP
.B \-cpuprofile
Write CPU profile to file.
.TP
.BR "\-format " \fIformat\fR
Output format:

.B plain
An editor-friendly format in which every line of output is of the form "pos:
text", where pos is "-" if unknown. This is the default.

.B json
Structured data in JSON syntax.

.B xml
Structured data in XML syntax.

.TP
.B \-modified
Read archive of modified files from standard input.

Files in this archive will be used in preference to those in the file system.
In this way, a text editor may supply guru with the contents of its unsaved
buffers.  Each archive entry consists of the file name, a newline, the decimal
file size, another newline, and the contents of the file.
.TP
.BR "\-ptalog " \fIfile\fR
Write points-to analysis log to file.
.TP
.B \-reflect
Analyze reflection soundly (slow).
.TP
.BR "\-scope " \fIpackages\fR
Comma-separated list of packages the analysis should be limited to.
Its value is a comma-separated list of patterns of these forms:
.Vb 6
\&	golang.org/x/tools/cmd/guru	# a single package
\&	golang.org/x/tools/...		# all packages beneath dir
\&	...				# the entire workspace.
.Vb

A pattern preceded by '-' is negative, so the scope
.Vb 6
\&	encoding/...,-encoding/xml
.Ve
matches all encoding packages except encoding/xml.

.TP
.BI "\-tags " build_tags
A list of build tags to consider satisfied during the build. For more
information about build tags, see the description of build constraints in the
documentation for the go/build package (default <tagsFlag>).

.SH EXAMPLES

Describe the syntax at offset 530 in this file (an import spec):

.Vb 6
\&      golang-guru describe src/golang.org/x/tools/cmd/guru/main.go:#530
.Ve

.SH AUTHOR
.PP
This manual page was written by Michael Stapelberg <stapelberg@debian.org>,
for the Debian project (and may be used by others).