go-srcmerge

module
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Feb 6, 2023 License: MIT

README

go-srcmerge

This tool can merge multiple Go source files into one. In the process it removes all duplicates. If there is a name conflict, the names get refactored.

Example

File a.go

package a

var Hello = "World"

type Foo []string

File b.go

package b

var Hello = "World"

type Foo []int

Execute the following command

srcmerge -f a.go -r A -f b.go -r B -p out -o out.go

Resulting out.go

package out

var Hello = "World"

type Foo []string
type FooB []int

Jump to

Keyboard shortcuts

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