Skip to content

guangxuewu/gogimport

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

36 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

gogimport

golang grouping import tool

introduction

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

install

go get -u github.com/guangxuewu/[email protected]

usage

Usage of gogimport:
gogimport [options] [file ...]

Options:
  -local string
        local package name
Example command:
gogimport -local ${packaname} some.go other.go

goland 配置

vscode配置

About

golang grouping import

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Go 100.0%