Skip to content

Commit

Permalink
Add next defer function
Browse files Browse the repository at this point in the history
Signed-off-by: Atanas Alexandrov <sirakov@gmail.com>
  • Loading branch information
cupakob committed Nov 11, 2024
1 parent 396cdd8 commit a9a44c4
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions cmd/sharded-test-server/frontproxy.go
Original file line number Diff line number Diff line change
Expand Up @@ -157,12 +157,12 @@ func startFrontProxy(
return err
}

// defer func() {
// err = logFile.Close()
// if err != nil {
// logger.Error(err, "failed to close the log file")
// }
// }()
defer func() {
err = logFile.Close()
if err != nil {
logger.Error(err, "failed to close the log file")
}
}()

writer := helpers.NewHeadWriter(logFile, out)
cmd.Stdout = writer
Expand Down

0 comments on commit a9a44c4

Please sign in to comment.