/gogoimports

gogoimports collapse imports to two groups: stdlib and other

Primary LanguageGoMIT LicenseMIT

gogoimports collapse imports to two groups: stdlib and other.

Install: go get github.com/necryin/gogoimports

For example:

import (
    "github.com/prometheus/client_golang/prometheus"
    "flag"
    
    "os"
    "os/signal"
    "syscall"

    "go.uber.org/zap"
)

became

import (
    "flag"
    "os"
    "os/signal"
    "syscall"

    "github.com/prometheus/client_golang/prometheus"
    "go.uber.org/zap"
)

NB! Should be used together with goimports and called after it