https://github.com/abenz1267/gomvp
gomvp lets you refactor/rename packages
https://github.com/abenz1267/gomvp
cli go refactoring tooling
Last synced: 5 months ago
JSON representation
gomvp lets you refactor/rename packages
- Host: GitHub
- URL: https://github.com/abenz1267/gomvp
- Owner: abenz1267
- License: mit
- Created: 2022-07-24T11:53:55.000Z (almost 4 years ago)
- Default Branch: master
- Last Pushed: 2022-10-25T10:15:34.000Z (over 3 years ago)
- Last Synced: 2026-02-10T06:22:24.150Z (5 months ago)
- Topics: cli, go, refactoring, tooling
- Language: Go
- Homepage:
- Size: 5.86 KB
- Stars: 14
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# gomvp - move packages, rename modules
gomvp is a simple CLI tool that helps you refactor packages and rename modules.
## Installation
`go install github.com/abenz1267/gomvp@latest`
... or download the binary from the releases.
## Usage
`gomvp `, for example `gomvp somepackage movedpackage`
If the src is equivalent to the current module name, then instead the module is renamed, so f.e. `gomvp github.com/abenz1267/gomvp github.com/abenz1267/newmodule` will rename the module.
Moving files is performed via `git mv`, so they have to be added via git before usage.
## Notes
- will abort if there's a conflicting package present
- named imports won't be altered, as it's just replacing the actual import string
- usage of named imports won't be altered, as it's just replacing the package name