hswg: don't eat libasciidoc rendering errors

An unfortunate consequence of the := operator's behaviour.

Also, update copyright years.
This commit is contained in:
Přemysl Eric Janouch 2021-09-23 20:56:45 +02:00
parent f9e1f9a244
commit c3905349b0
Signed by: p
GPG Key ID: A0420B94F92B9493
2 changed files with 4 additions and 4 deletions

View File

@ -1,4 +1,4 @@
Copyright (c) 2018, Přemysl Eric Janouch <p@janouch.name>
Copyright (c) 2018 - 2021, Přemysl Eric Janouch <p@janouch.name>
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted.

View File

@ -78,9 +78,9 @@ func Render(r io.Reader, config configuration.Configuration) (
var doc types.Document
if doc, err = parser.ParseDocument(pr, config); err == nil {
problems, err := validator.Validate(&doc)
if err != nil {
fmt.Fprintln(os.Stderr, err)
problems, verr := validator.Validate(&doc)
if verr != nil {
fmt.Fprintln(os.Stderr, verr)
}
for _, problem := range problems {
fmt.Fprintln(os.Stderr, problem.Message)