From 01f85bd559c6b6157c7a75b1d33c5eb3e8e63ce9 Mon Sep 17 00:00:00 2001 From: revelaction <96388231+revelaction@users.noreply.github.com> Date: Sat, 21 Oct 2023 14:04:58 +0200 Subject: [PATCH] fix error format --- export.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/export.go b/export.go index 187cba7..b9cde21 100644 --- a/export.go +++ b/export.go @@ -54,12 +54,12 @@ func (ex *Exporter) Export(notes *Notes) error { var out io.Writer f, err := os.OpenFile(outFile, os.O_WRONLY|os.O_CREATE|os.O_TRUNC, 0600) if err != nil { - return fmt.Errorf("failed to open output file %q: %v", f, err) + return fmt.Errorf("failed to open output file %q: %v", outFile, err) } defer func() { if err = f.Close(); err != nil { - err = fmt.Errorf("failed to close output file %q: %v", f, err) + err = fmt.Errorf("failed to close output file %q: %v", outFile, err) } }()