Cap32 / migrate-go-mod-cli

cli tool for automatic migrating to go mod

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Migrate-go-mod-cli

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"
)

Installation

$ npm install -g migrate-to-mod-cli

You should install node.js (>= v8.0) first

Usage

migrate-go-mod -m <module> -i <input> -o <output>

Contrubitting

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.

License

MIT

About

cli tool for automatic migrating to go mod

License:MIT License


Languages

Language:JavaScript 100.0%