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 23:20:04 -08:00
parent c65bb21a51
commit fcaa545e1e
20 changed files with 98 additions and 99 deletions
+5 -5
View File
@@ -11,7 +11,7 @@ import (
"github.com/tendermint/abci/client"
"github.com/tendermint/abci/types"
. "github.com/tendermint/go-common"
common "github.com/tendermint/go-common"
"github.com/urfave/cli"
)
@@ -135,7 +135,7 @@ func main() {
app.Before = before
err := app.Run(os.Args)
if err != nil {
Exit(err.Error())
common.Exit(err.Error())
}
}
@@ -145,7 +145,7 @@ func before(c *cli.Context) error {
var err error
client, err = abcicli.NewClient(c.GlobalString("address"), c.GlobalString("abci"), false)
if err != nil {
Exit(err.Error())
common.Exit(err.Error())
}
}
return nil
@@ -244,7 +244,7 @@ func cmdSetOption(c *cli.Context) error {
return errors.New("Command set_option takes 2 arguments (key, value)")
}
res := client.SetOptionSync(args[0], args[1])
rsp := newResponse(res, Fmt("%s=%s", args[0], args[1]), false)
rsp := newResponse(res, common.Fmt("%s=%s", args[0], args[1]), false)
printResponse(c, rsp)
return nil
}
@@ -284,7 +284,7 @@ func cmdCheckTx(c *cli.Context) error {
// Get application Merkle root hash
func cmdCommit(c *cli.Context) error {
res := client.CommitSync()
rsp := newResponse(res, Fmt("0x%X", res.Data), false)
rsp := newResponse(res, common.Fmt("0x%X", res.Data), false)
printResponse(c, rsp)
return nil
}
+3 -3
View File
@@ -5,7 +5,7 @@ import (
"github.com/tendermint/abci/example/counter"
"github.com/tendermint/abci/server"
. "github.com/tendermint/go-common"
common "github.com/tendermint/go-common"
)
func main() {
@@ -19,11 +19,11 @@ func main() {
// Start the listener
srv, err := server.NewServer(*addrPtr, *abciPtr, app)
if err != nil {
Exit(err.Error())
common.Exit(err.Error())
}
// Wait forever
TrapSignal(func() {
common.TrapSignal(func() {
// Cleanup
srv.Stop()
})
+3 -3
View File
@@ -6,7 +6,7 @@ import (
"github.com/tendermint/abci/example/dummy"
"github.com/tendermint/abci/server"
"github.com/tendermint/abci/types"
. "github.com/tendermint/go-common"
common "github.com/tendermint/go-common"
)
func main() {
@@ -27,11 +27,11 @@ func main() {
// Start the listener
srv, err := server.NewServer(*addrPtr, *abciPtr, app)
if err != nil {
Exit(err.Error())
common.Exit(err.Error())
}
// Wait forever
TrapSignal(func() {
common.TrapSignal(func() {
// Cleanup
srv.Stop()
})