Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/vikstrous/mvpkg
A tool for moving Go packages within a Go module
https://github.com/vikstrous/mvpkg
Last synced: 4 days ago
JSON representation
A tool for moving Go packages within a Go module
- Host: GitHub
- URL: https://github.com/vikstrous/mvpkg
- Owner: vikstrous
- License: mit
- Created: 2020-02-23T03:00:08.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2025-01-01T15:56:18.000Z (9 days ago)
- Last Synced: 2025-01-01T16:37:58.924Z (9 days ago)
- Language: Go
- Size: 76.2 KB
- Stars: 11
- Watchers: 3
- Forks: 0
- Open Issues: 8
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# mvpkg
[![CircleCI](https://circleci.com/gh/vikstrous/mvpkg.svg?style=svg)](https://circleci.com/gh/vikstrous/mvpkg)
[![codecov](https://codecov.io/gh/vikstrous/mvpkg/branch/master/graph/badge.svg)](https://codecov.io/gh/vikstrous/mvpkg)
[![GolangCI](https://golangci.com/badges/github.com/vikstrous/mvpkg.svg)](https://golangci.com/r/github.com/vikstrous/mvpkg)mvpkg is a refactoring tool for Go codebases that allows you to move a package
or a set of packages from one path to another within the same go module. It's
written for go modules and with performance in mind, so let me know if it's not
fast enough for you.This tool was built because [gomvpkg](https://github.com/golang/tools/blob/e1da425f72fd3793b579f4e74d908ba96eb16c8a/cmd/gomvpkg/main.go) doesn't work with go modules.
## Installation:
```
go get github.com/vikstrous/mvpkg
```## Usage:
```
Usage: mvpkgmvpkg takes two positional arguments: a source and destination path
It works only withing a single go module and only with go module support enabled.
The source and destination paths must be relative to the root of the go module-build-flags value
build tags to use while parsing source packages, can be specified morethan once
ex: -build-flags='-tags=foo bar'
-dry-run
print planned actions without executing them
-recursive
recursively move all packages nested under the source package
-v verbose, print status while running
```