GOTYPE(1) | General Commands Manual | GOTYPE(1) |
gotype - syntatic and semantic analysis of Go files
gotype [flags] [ path ... ]
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.
To check the files a.go, b.go, and c.go:
gotype a.go b.go c.go
To check an entire package in the directory dir and print the processed files:
gotype -v dir
To check an entire package including tests in the local directory:
gotype -a .
To verify the output of a pipe:
echo "package foo" | gotype
This manual page was written by Michael Stapelberg <stapelberg@debian.org>, for the Debian project (and may be used by others).
2013-12-02 |