Skip to content

Commit

Permalink
Fix error message to prevent nil deref
Browse files Browse the repository at this point in the history
  • Loading branch information
asmaloney committed Feb 29, 2024
1 parent cc379b1 commit da3de4d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion framework/writerhelper.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ func (w *WriterHelper) WriteFile(outputFileName string) (err error) {
if closeErr != nil {
// If we also had an error on Close(), return both errors
if writeErr != nil {
err = fmt.Errorf("%s; %w", err.Error(), writeErr)
err = fmt.Errorf("%s; %w", closeErr.Error(), writeErr)
} else {
err = closeErr
}
Expand Down

0 comments on commit da3de4d

Please sign in to comment.