Skip to content

Commit

Permalink
fix error format
Browse files Browse the repository at this point in the history
  • Loading branch information
revelaction committed Oct 21, 2023
1 parent da0edb6 commit 01f85bd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions export.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
}()

Expand Down

0 comments on commit 01f85bd

Please sign in to comment.