https://github.com/cap32/migrate-go-mod-cli
cli tool for automatic migrating to go mod
https://github.com/cap32/migrate-go-mod-cli
Last synced: 2 months ago
JSON representation
cli tool for automatic migrating to go mod
- Host: GitHub
- URL: https://github.com/cap32/migrate-go-mod-cli
- Owner: Cap32
- License: mit
- Created: 2019-04-13T10:37:33.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2019-04-13T11:00:31.000Z (about 7 years ago)
- Last Synced: 2025-03-22T14:25:57.545Z (about 1 year ago)
- Language: JavaScript
- Size: 14.6 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# Migrate-go-mod-cli
CLI tool for automatic migrating to `go mod`. Will fix relative paths in `import` statements.
**From**
```go
import (
"fmt"
"./foo/bar"
qux "./baz"
)
```
**To**
```go
import (
"fmt"
"my-module/foo/bar"
qux "my-module/baz"
)
```
## Installation
```bash
$ npm install -g migrate-to-mod-cli
```
**You should install node.js (>= v8.0) first**
## Usage
```bash
migrate-go-mod -m -i -o
```
## 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