Merge PR #1438: Tools: Add errcheck linter

This linter ensures that all errors are checked.
This is disabled in the client directories, since its not needed on
those writes
This commit is contained in:
Dev Ojha
2018-06-29 00:52:10 +02:00
committed by Christopher Goes
parent 7f59aa259f
commit ac3adff1e8
30 changed files with 193 additions and 46 deletions
+5 -1
View File
@@ -80,5 +80,9 @@ func main() {
// prepare and add flags
executor := cli.PrepareMainCmd(rootCmd, "BC", os.ExpandEnv("$HOME/.basecli"))
executor.Execute()
err := executor.Execute()
if err != nil {
// handle with #870
panic(err)
}
}
+5 -1
View File
@@ -33,7 +33,11 @@ func main() {
// prepare and add flags
rootDir := os.ExpandEnv("$HOME/.basecoind")
executor := cli.PrepareBaseCmd(rootCmd, "BC", rootDir)
executor.Execute()
err := executor.Execute()
if err != nil {
// handle with #870
panic(err)
}
}
func newApp(logger log.Logger, db dbm.DB) abci.Application {
+5 -1
View File
@@ -92,5 +92,9 @@ func main() {
// prepare and add flags
executor := cli.PrepareMainCmd(rootCmd, "BC", os.ExpandEnv("$HOME/.democli"))
executor.Execute()
err := executor.Execute()
if err != nil {
// handle with #870
panic(err)
}
}
+5 -1
View File
@@ -72,5 +72,9 @@ func main() {
// prepare and add flags
rootDir := os.ExpandEnv("$HOME/.democoind")
executor := cli.PrepareBaseCmd(rootCmd, "BC", rootDir)
executor.Execute()
err := executor.Execute()
if err != nil {
// handle with #870
panic(err)
}
}
+8 -2
View File
@@ -55,12 +55,18 @@ func main() {
fmt.Println(err)
os.Exit(1)
}
srv.Start()
err = srv.Start()
if err != nil {
cmn.Exit(err.Error())
}
// Wait forever
cmn.TrapSignal(func() {
// Cleanup
srv.Stop()
err = srv.Stop()
if err != nil {
cmn.Exit(err.Error())
}
})
return
}