CLI tool for automatic migrating to go mod
. Will fix relative paths in import
statements.
From
import (
"fmt"
"./foo/bar"
qux "./baz"
)
To
import (
"fmt"
"my-module/foo/bar"
qux "my-module/baz"
)
$ npm install -g migrate-to-mod-cli
You should install node.js (>= v8.0) first
migrate-go-mod -m <module> -i <input> -o <output>
This tool is written by node.js
and yarn
.
To develop this tool, please run yarn install
to install the dependencies,
and make sure yarn test
is passed.
PR is welcome.
MIT