cli: add error return check for compiler.CompileAndInspect()

GolangCI complains:
  Error return value of compiler.CompileAndInspect is not checked (from errcheck)
This commit is contained in:
Roman Khimov 2019-08-14 20:29:32 +03:00
parent 2daebdfce2
commit 01330e7ed7

View file

@ -254,6 +254,8 @@ func inspect(ctx *cli.Context) error {
if len(src) == 0 {
return cli.NewExitError(errNoInput, 1)
}
compiler.CompileAndInspect(src)
if err := compiler.CompileAndInspect(src); err != nil {
return cli.NewExitError(err, 1)
}
return nil
}