From c3905349b05bdb1adace7fe8dd20e805724962bc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?P=C5=99emysl=20Eric=20Janouch?= Date: Thu, 23 Sep 2021 20:56:45 +0200 Subject: hswg: don't eat libasciidoc rendering errors An unfortunate consequence of the := operator's behaviour. Also, update copyright years. --- LICENSE | 2 +- hswg/main.go | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/LICENSE b/LICENSE index b3e3bc0..c121954 100644 --- a/LICENSE +++ b/LICENSE @@ -1,4 +1,4 @@ -Copyright (c) 2018, Přemysl Eric Janouch +Copyright (c) 2018 - 2021, Přemysl Eric Janouch Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted. diff --git a/hswg/main.go b/hswg/main.go index 6cec971..e4b557f 100644 --- a/hswg/main.go +++ b/hswg/main.go @@ -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) -- cgit v1.2.3