chore: enhance golangci-lint configuration and clean up error handling
- Added new linters for the examples directory to improve code quality checks. - Updated output formatting to direct lint results to stdout for better visibility. - Cleaned up comments related to error handling in various files for clarity and consistency.
This commit is contained in:
@@ -220,12 +220,10 @@ func main() {
|
||||
log.Fatalf("Failed to create output file: %v", err)
|
||||
}
|
||||
defer func() {
|
||||
//nolint:errcheck // Close error is not critical, file is already written
|
||||
_ = f.Close()
|
||||
}()
|
||||
|
||||
if err := tmpl.Execute(f, testData); err != nil {
|
||||
//nolint:errcheck // Close error is not critical before fatal exit
|
||||
_ = f.Close()
|
||||
//nolint:gocritic // Fatalf exits, defer won't run - this is acceptable
|
||||
log.Fatalf("Failed to execute template: %v", err)
|
||||
|
||||
Reference in New Issue
Block a user