Skip to content

Commit

Permalink
chore: remove error handling on file close
Browse files Browse the repository at this point in the history
Signed-off-by: Alexandre Couedelo <[email protected]>
  • Loading branch information
xNok committed Nov 13, 2024
1 parent 0ae0a1a commit e9f34b7
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions internal/commands/document.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ package commands

import (
"fmt"
"log"
"os"
"path/filepath"

Expand Down Expand Up @@ -49,11 +48,7 @@ func NewDocumentCommand() *cobra.Command {
if err != nil {
return fmt.Errorf("opening %s for writing output: %w", outPath, err)
}
defer func(file *os.File) {
if err := file.Close(); err != nil {
log.Fatalln(err)
}
}(f)
defer f.Close() //nolint // CLI is exiting anyway and there's not much we can do.

template, err := cmd.Flags().GetString("template")
if err != nil {
Expand Down

0 comments on commit e9f34b7

Please sign in to comment.