Documentation ¶
Overview ¶
Gocat combines multiple Go source files into a single source file, optionally adding a prefix to all top-level names.
Usage:
gocat [-p pkgname] [-x prefix] file_0 [file_n...] >file.go
Example
gocat -p acl github.com/naegelejd/go-acl/acl* > acl.go
Bugs ¶
Gocat has many limitations, most of them not fundamental.
It does not work with cgo.
It does not correctly translate struct literals when prefixing is enabled and a field key in the literal key is the same as a top-level name.
It does not work with embedded struct fields. TODO: check merging several packages and work on merging renamed imports
Click to show internal directories.
Click to hide internal directories.