gocat

command module
v0.0.0-...-87542f7 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 21, 2024 License: BSD-3-Clause Imports: 14 Imported by: 0

README

gocat

gocat concatenates Go source files within a package

usage

gocat auth*.go > auth.go

license

See LICENSE file.

Copyright (c) 2014 The Go Authors. All rights reserved.

Originally authored by Russ Cox as bundle

Modified by Joseph Naegele, 2015.

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL