From aa16e7ae26e72ac9e5e91de42808e5d0054740a9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Manuel=20R=C3=BCger?= Date: Thu, 12 Mar 2026 23:07:13 +0100 Subject: [PATCH] fix: check error return from fmt.Fprintln errcheck lint requires all error return values to be handled. Propagate write errors from both Fprintln call sites. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- mark.go | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/mark.go b/mark.go index 637a3be..3941e74 100644 --- a/mark.go +++ b/mark.go @@ -116,7 +116,9 @@ func Run(config Config) error { if target != nil { log.Infof(nil, "page successfully updated: %s", config.BaseURL+target.Links.Full) - fmt.Fprintln(config.output(), config.BaseURL+target.Links.Full) + if _, err := fmt.Fprintln(config.output(), config.BaseURL+target.Links.Full); err != nil { + return err + } } } @@ -264,7 +266,9 @@ func ProcessFile(file string, api *confluence.API, config Config) (*confluence.P ImageAlign: imageAlign, } html, _ := markmd.CompileMarkdown(markdown, std, file, cfg) - fmt.Fprintln(config.output(), html) + if _, err := fmt.Fprintln(config.output(), html); err != nil { + return nil, err + } return nil, nil }