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:
@@ -1102,21 +1102,18 @@ func createTarGz(sourceDir, archivePath string) error {
|
||||
return fmt.Errorf("failed to create archive file: %w", err)
|
||||
}
|
||||
defer func() {
|
||||
//nolint:errcheck // Close error is not critical for cleanup
|
||||
_ = archiveFile.Close()
|
||||
}()
|
||||
|
||||
// Create gzip writer
|
||||
gzWriter := gzip.NewWriter(archiveFile)
|
||||
defer func() {
|
||||
//nolint:errcheck // Close error is not critical for cleanup
|
||||
_ = gzWriter.Close()
|
||||
}()
|
||||
|
||||
// Create tar writer
|
||||
tarWriter := tar.NewWriter(gzWriter)
|
||||
defer func() {
|
||||
//nolint:errcheck // Close error is not critical for cleanup
|
||||
_ = tarWriter.Close()
|
||||
}()
|
||||
|
||||
@@ -1156,7 +1153,6 @@ func createTarGz(sourceDir, archivePath string) error {
|
||||
return fmt.Errorf("failed to open file: %w", err)
|
||||
}
|
||||
defer func() {
|
||||
//nolint:errcheck // Close error is not critical for cleanup
|
||||
_ = file.Close()
|
||||
}()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user