Skip to content

A tool for moving Go packages within a Go module

License

Notifications You must be signed in to change notification settings

vikstrous/mvpkg

Repository files navigation

mvpkg

CircleCI codecov GolangCI

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 doesn't work with go modules.

Installation:

go get github.com/vikstrous/mvpkg

Usage:

Usage: mvpkg <src> <dst>

  mvpkg 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

About

A tool for moving Go packages within a Go module

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages