File: gotype.1

package info (click to toggle)
golang-golang-x-tools 1%3A0.25.0%2Bds-1
  • links: PTS, VCS
  • area: main
  • in suites: sid, trixie
  • size: 22,724 kB
  • sloc: javascript: 2,027; asm: 1,645; sh: 166; yacc: 155; makefile: 49; ansic: 8
file content (89 lines) | stat: -rw-r--r-- 1,864 bytes parent folder | download | duplicates (8)
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
.\"                                      Hey, EMACS: -*- nroff -*-
.de Vb \" Begin verbatim text
.ft CW
.nf
.ne \\$1
..
.de Ve \" End verbatim text
.ft R
.fi
..
.TH GOTYPE 1 "2013-12-02"
.\" Please adjust this date whenever revising the manpage.
.SH NAME
gotype \- syntatic and semantic analysis of Go files
.SH SYNOPSIS
.B gotype
.RI [ flags ]
.RI [
.IR "path ..."
.RI ]
.SH DESCRIPTION
The gotype command does syntactic and semantic analysis of Go files
and packages like the front-end of a Go compiler. Errors are reported
if the analysis fails; otherwise gotype is quiet (unless -v is set).

Without a list of paths, gotype reads from standard input, which
must provide a single Go source file defining a complete package.

If a single path is specified that is a directory, gotype checks
the Go files in that directory; they must all belong to the same
package.

Otherwise, each path must be the filename of Go file belonging to
the same package.

.SH OPTIONS

.TP
.B \-a
use all (incl. _test.go) files when processing a directory
.TP
.B \-ast
print AST (forces -seq)
.TP
.B \-comments
parse comments (ignored unless -ast or -trace is provided)
.TP
.B \-e
report all errors (not just the first 10)
.TP
.B \-seq
parse sequentially, rather than in parallel
.TP
.B \-trace
print parse trace (forces -seq)
.TP
.B \-v
verbose mode

.SH EXAMPLES

To check the files a.go, b.go, and c.go:

.Vb 6
\&      gotype a.go b.go c.go
.Ve

To check an entire package in the directory dir and print the processed files:

.Vb 6
\&      gotype -v dir
.Ve

To check an entire package including tests in the local directory:

.Vb 6
\&      gotype -a .
.Ve

To verify the output of a pipe:

.Vb 6
\&      echo "package foo" | gotype
.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).