golang grouping import tool
gogimport will grouping imports by stdlib, thirdparty, custom packages like the example below:
$ gogimport -local github.com/wusendong/example main.go
// 默认code.yunzhanghu.com 为 custom packages
$ gogimport main.go
package main
import (
"fmt"
"log"
"gopkg.in/redis.v5"
"github.com/gorilla/context"
"github.com/wusendong/example"
)
go get -u github.com/guangxuewu/[email protected]
Usage of gogimport:
gogimport [options] [file ...]
Options:
-local string
local package name
Example command:
gogimport -local ${packaname} some.go other.go