Enable errcheck linter (#646)

This commit is contained in:
Duco van Amstel
2018-12-08 16:04:10 +00:00
committed by Wim
parent b6d81f34ba
commit a2754f15fc
7 changed files with 37 additions and 25 deletions

View File

@@ -28,8 +28,11 @@ func main() {
flagGops := flag.Bool("gops", false, "enable gops agent")
flag.Parse()
if *flagGops {
agent.Listen(agent.Options{})
defer agent.Close()
if err := agent.Listen(agent.Options{}); err != nil {
flog.Errorf("failed to start gops agent: %#v", err)
} else {
defer agent.Close()
}
}
if *flagVersion {
fmt.Printf("version: %s %s\n", version, githash)