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