Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type GoFileConverger ¶
type GoFileConverger struct { // MaxWorkers determines the maximum amount // of file workers that will be created to // process all files in the given directory. MaxWorkers int // Packages is a list of packages to include in the output. // If empty, converger will default to top-level NON-TEST // package in the given directory. Packages []string // Excludes is a list of files to exclude from merging. Excludes []string // Logger is the logger to use for logging. Logger logger.LevelLogger }
GoFileConverger is a struct that converges multiple Go files into one.
func NewGoFileConverger ¶
func NewGoFileConverger(opts ...Option) *GoFileConverger
NewGoFileConverger creates a new GoFileConverger with sensible defaults.
func (*GoFileConverger) ConvergeFiles ¶
ConvergeFiles converges all Go files in the given directory and package into one and writes the result to the given output.
type Option ¶
type Option func(*GoFileConverger)
Option is a functional option for the GoFileConverger.
func WithExcludes ¶
WithExcludes sets the list of files to exclude from merging.
func WithLogger ¶
func WithLogger(logger logger.LevelLogger) Option
WithLogger sets the logger for the GoFileConverger.
func WithMaxWorkers ¶
WithMaxWorkers sets the maximum amount of workers to use.
func WithPackages ¶
WithPackages sets the list of packages to include in the output.
Click to show internal directories.
Click to hide internal directories.