Skip to content

A command line tool for merging multiple go.mod files.

Notifications You must be signed in to change notification settings

brendanjryan/modmerge

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

modmerge

A command line tool for merging multiple go.mod files into a single file.

Useful when combining projects or making an "uber module" for projects which use the multiple module repository pattern.

Installation

go get -u github.com/brendanjryan/modmerge

Usage

Default:

modmerge <go.mod files...>

To specify an output file:

modmerge -o go.mod.new go.mod services/user/go.mod services/tweets/go.mod

Example

$ modmerge go.mod project/go.mod
2019/10/06 14:34:29 reading module files...
2019/10/06 14:34:29 reading file: go.mod
2019/10/06 14:34:29 reading file: project/go.mod
2019/10/06 14:34:29 merging module files...
2019/10/06 14:34:29 writng final result to go.mod.new...
2019/10/06 14:34:29 Successfully wrote merged modules to go.mod.new
$ modmerge -o go.mod.merged go.mod project/go.mod
2019/10/06 14:34:29 reading module files...
2019/10/06 14:34:29 reading file: go.mod
2019/10/06 14:34:29 reading file: project/go.mod
2019/10/06 14:34:29 merging module files...
2019/10/06 14:34:29 writng final result to go.mod.merged...
2019/10/06 14:34:29 Successfully wrote merged modules to go.mod.merged

About

A command line tool for merging multiple go.mod files.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published