It would be better to use goimports to organize imported packages #2766
Closed
Description
opened on Nov 12, 2018
For now, we do not use tools to organize imported packages.
For example, baseapp/helpers.go
import (
sdk "github.com/cosmos/cosmos-sdk/types"
"github.com/tendermint/tendermint/abci/server"
abci "github.com/tendermint/tendermint/abci/types"
cmn "github.com/tendermint/tendermint/libs/common"
)
the proper format should be
import (
cmn "github.com/tendermint/tendermint/libs/common"
sdk "github.com/cosmos/cosmos-sdk/types"
"github.com/tendermint/tendermint/abci/server"
abci "github.com/tendermint/tendermint/abci/types"
)
the general idea to organize imported packages is to group imported packages as three groups:
- std packages
- third party pacakges
- self packages
so it would be better to add goimports tools to makefile.
Metadata
Assignees
Labels
No labels
Activity