lint: remove dot import (go-common)

Spell out the package explicitly.
This commit is totally textual, and does not change any logic.

The swiss-army knife package may serve a kick-start in early
stage development. But as the codebase growing, we might want
to retire it gradually:

  For simple wrapping functions, just inline it on the call site.
  For larger pice of code, make it an independent package.
This commit is contained in:
Tzu-Jung Lee
2017-01-16 22:48:24 -08:00
parent c65bb21a51
commit fcaa545e1e
20 changed files with 98 additions and 99 deletions

View File

@@ -5,7 +5,7 @@ import (
"github.com/tendermint/abci/server"
"github.com/tendermint/abci/types"
. "github.com/tendermint/go-common"
common "github.com/tendermint/go-common"
)
func main() {
@@ -17,11 +17,11 @@ func main() {
// Start the listener
srv, err := server.NewServer(*addrPtr, *abciPtr, NewChainAwareApplication())
if err != nil {
Exit(err.Error())
common.Exit(err.Error())
}
// Wait forever
TrapSignal(func() {
common.TrapSignal(func() {
// Cleanup
srv.Stop()
})
@@ -58,7 +58,7 @@ func (app *ChainAwareApplication) Commit() types.Result {
}
func (app *ChainAwareApplication) Query(query []byte) types.Result {
return types.NewResultOK([]byte(Fmt("%d,%d", app.beginCount, app.endCount)), "")
return types.NewResultOK([]byte(common.Fmt("%d,%d", app.beginCount, app.endCount)), "")
}
func (app *ChainAwareApplication) BeginBlock(hash []byte, header *types.Header) {

View File

@@ -8,7 +8,7 @@ import (
"github.com/tendermint/abci/client"
"github.com/tendermint/abci/server"
"github.com/tendermint/abci/types"
. "github.com/tendermint/go-common"
common "github.com/tendermint/go-common"
)
func TestChainAware(t *testing.T) {
@@ -25,7 +25,7 @@ func TestChainAware(t *testing.T) {
// Connect to the socket
client, err := abcicli.NewSocketClient("unix://test.sock", false)
if err != nil {
Exit(Fmt("Error starting socket client: %v", err.Error()))
common.Exit(Fmt("Error starting socket client: %v", err.Error()))
}
client.Start()
defer client.Stop()