Debian Codegraph @

debian/man/gotype.1

raw
1 .\" Hey, EMACS: -*- nroff -*-
2 .de Vb \" Begin verbatim text
3 .ft CW
4 .nf
5 .ne \\$1
6 ..
7 .de Ve \" End verbatim text
8 .ft R
9 .fi
10 ..
11 .TH GOTYPE 1 "2013-12-02"
12 .\" Please adjust this date whenever revising the manpage.
13 .SH NAME
14 gotype \- syntatic and semantic analysis of Go files
15 .SH SYNOPSIS
16 .B gotype
17 .RI [ flags ]
18 .RI [
19 .IR "path ..."
20 .RI ]
21 .SH DESCRIPTION
22 The gotype command does syntactic and semantic analysis of Go files
23 and packages like the front-end of a Go compiler. Errors are reported
24 if the analysis fails; otherwise gotype is quiet (unless -v is set).
25
26 Without a list of paths, gotype reads from standard input, which
27 must provide a single Go source file defining a complete package.
28
29 If a single path is specified that is a directory, gotype checks
30 the Go files in that directory; they must all belong to the same
31 package.
32
33 Otherwise, each path must be the filename of Go file belonging to
34 the same package.
35
36 .SH OPTIONS
37
38 .TP
39 .B \-a
40 use all (incl. _test.go) files when processing a directory
41 .TP
42 .B \-ast
43 print AST (forces -seq)
44 .TP
45 .B \-comments
46 parse comments (ignored unless -ast or -trace is provided)
47 .TP
48 .B \-e
49 report all errors (not just the first 10)
50 .TP
51 .B \-seq
52 parse sequentially, rather than in parallel
53 .TP
54 .B \-trace
55 print parse trace (forces -seq)
56 .TP
57 .B \-v
58 verbose mode
59
60 .SH EXAMPLES
61
62 To check the files a.go, b.go, and c.go:
63
64 .Vb 6
65 \& gotype a.go b.go c.go
66 .Ve
67
68 To check an entire package in the directory dir and print the processed files:
69
70 .Vb 6
71 \& gotype -v dir
72 .Ve
73
74 To check an entire package including tests in the local directory:
75
76 .Vb 6
77 \& gotype -a .
78 .Ve
79
80 To verify the output of a pipe:
81
82 .Vb 6
83 \& echo "package foo" | gotype
84 .Ve
85
86 .SH AUTHOR
87 .PP
88 This manual page was written by Michael Stapelberg <[email protected]>,
89 for the Debian project (and may be used by others).