readme: handle parse errors in example (#20)

This commit is contained in:
Ruud Kamphuis 2021-08-01 21:00:01 +02:00 committed by GitHub
parent 18acbf96bd
commit d846011a9b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -66,6 +66,13 @@ func main() {
log.Fatal("Error:" + err.Error())
}
if len(parserErrors) > 0 {
for _, e := range parserErrors {
log.Println(e.String())
}
os.Exit(1)
}
// Dump
goDumper := dumper.NewDumper(os.Stdout).