goremod

command module
v0.4.1 Latest Latest
Warning

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

Go to latest
Published: Jul 12, 2025 License: Unlicense Imports: 8 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README ΒΆ

goremod

goremod is a Go tool designed to automatically replace the module name and import paths in your Go project files (go.mod and .go files). It simplifies the process of migrating or renaming a Go module by updating all relevant references with a single command.


πŸš€ Features

  • Replace module name in go.mod
  • Update import paths in .go files (single-line and multi-line import blocks)
  • Process multiple files or entire projects
  • Simple CLI interface for quick renaming

πŸ”§ Installation

go install github.com/baldazi/goremod@latest

πŸ“– Usage

CLI usage

Use the following command to replace the module name and import paths in your project:

go remod "new/module/name"

This command updates:

  • The module directive in your go.mod file
  • All import statements referencing the old module in .go files
Example

If your current module is old/module, and you want to rename it to new/module, run:

go remod "new/module"

Programmatic usage

You can also use the goremod package directly in Go code:

🀝 Contributing

Contributions are welcome! Feel free to open issues or pull requests.


πŸ“œ License

This project is licensed under the MIT License. See LICENSE for details.

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