goworktidy

command module
v0.0.0-...-9d387bb Latest Latest
Warning

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

Go to latest
Published: Feb 21, 2024 License: MIT Imports: 9 Imported by: 0

README

goworktidy

Adds go mod edit commands to modules defined in go.work to your subprojects, allowing go mod tidy to run.

The Problem

Running go mod tidy in a workspace with modules of different names, or with unpublished modules, will fail.

The Manual Solution

You can run go mod edit -replace module=../path in each subproject to allow go mod tidy to run.

The Automated Solution

goworktidy will run identify all modules in your go.work, then identify which subprojects are missing replace declarations, and add them.

TODO

  • Add indirect replacements for dependencies of dependencies
  • Add require blocks similar to go mod tidy

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

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