Tzu-Jung Lee fcaa545e1e 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.
2017-01-16 23:20:04 -08:00

32 lines
667 B
Go

package main
import (
"flag"
"github.com/tendermint/abci/example/counter"
"github.com/tendermint/abci/server"
common "github.com/tendermint/go-common"
)
func main() {
addrPtr := flag.String("addr", "tcp://0.0.0.0:46658", "Listen address")
abciPtr := flag.String("abci", "socket", "ABCI server: socket | grpc")
serialPtr := flag.Bool("serial", false, "Enforce incrementing (serial) txs")
flag.Parse()
app := counter.NewCounterApplication(*serialPtr)
// Start the listener
srv, err := server.NewServer(*addrPtr, *abciPtr, app)
if err != nil {
common.Exit(err.Error())
}
// Wait forever
common.TrapSignal(func() {
// Cleanup
srv.Stop()
})
}