mkmerge

command
v0.32.0 Latest Latest
Warning

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

Go to latest
Published: Apr 3, 2025 License: BSD-3-ClauseImports: 16 Imported by: 0

Documentation

Overview

The mkmerge command parses generated source files and merges common consts, funcs, and types into a common source file, per GOOS.

Usage:

$ mkmerge -out MERGED FILE [FILE ...] 

Example:

# Remove all common consts, funcs, and types from zerrors_linux_*.go # and write the common code into zerrors_linux.go $ mkmerge -out zerrors_linux.go zerrors_linux_*.go 

mkmerge performs the merge in the following steps:

  1. Construct the set of common code that is identical in all architecture-specific files.
  2. Write this common code to the merged file.
  3. Remove the common code from all architecture-specific files.
close