{"id":23807112,"url":"https://github.com/brettbuddin/modtransplant","last_synced_at":"2026-04-27T00:30:20.015Z","repository":{"id":66774397,"uuid":"290933585","full_name":"brettbuddin/modtransplant","owner":"brettbuddin","description":"Merge a Go module dependency into the depending module.","archived":false,"fork":false,"pushed_at":"2020-08-28T15:32:05.000Z","size":8,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-01-01T23:30:12.795Z","etag":null,"topics":["go","golang","modules"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/brettbuddin.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-08-28T02:41:09.000Z","updated_at":"2020-08-28T16:01:52.000Z","dependencies_parsed_at":"2023-04-08T03:55:17.821Z","dependency_job_id":null,"html_url":"https://github.com/brettbuddin/modtransplant","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brettbuddin%2Fmodtransplant","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brettbuddin%2Fmodtransplant/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brettbuddin%2Fmodtransplant/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brettbuddin%2Fmodtransplant/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/brettbuddin","download_url":"https://codeload.github.com/brettbuddin/modtransplant/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240061727,"owners_count":19742083,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["go","golang","modules"],"created_at":"2025-01-01T23:27:45.295Z","updated_at":"2026-04-27T00:30:19.966Z","avatar_url":"https://github.com/brettbuddin.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"## modtransplant\n\nWe recently went through the process of merging a project dependency into the\nmain project (removing the dependency) at [InfluxData](https://influxdata.com).\nAfter struggling to do the `go.mod` merging by hand, I wrote this tool to help\nwith the process. The goal of this program is keep changes the resulting\n`go.mod` (after triggering the `go` tool) to a minimum, and yield a depeendecy\ngraph that's as close as possible to the original, but with the source module\nno-longer being a dependency of the destination.\n\n### Usage\n\n```\n$ go install github.com/brettbuddin/modtransplant\n$ modtransplant -dest=project-a/go.mod -src=project-b/go.mod [-force-overwrite] \u003e go-merged.mod\n```\n\nThe `-dest` is a filepath to the `go.mod` file of your destination module.\n\nThe `-src` is a filepath to the `go.mod` file of the module you are merging into\nthe destination module.\n\nThe optional `-force-overwrite` flag forces overwriting of a module path's\nversion in the destination when the tool detects two versions that it cannot\ncompare (e.g. `v0.5.0` vs `v0.0.0-20190523213315-cbe66965904d`). Ideally this\nshouldn't be necessary, but if you have a project with enough old dependencies,\nit might be useful.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbrettbuddin%2Fmodtransplant","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbrettbuddin%2Fmodtransplant","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbrettbuddin%2Fmodtransplant/lists"}