An open API service indexing awesome lists of open source software.

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

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