mirror of
https://github.com/lukaszraczylo/kportal.git
synced 2026-07-01 05:45:02 +00:00
chore: add golangci-lint v2 config and fix linter warnings (#46)
- [x] Add golangci-lint v2 configuration with formatters section - [x] Reorganize linters-settings under linters section - [x] Replace if-else chains with switch statements for clarity - [x] Wrap all ignored error returns with `_ = ` pattern - [x] Add OSC 8 hyperlink helper function for clickable ports - [x] Add blank line in table styling function - [x] Remove unnecessary type assertion in test
This commit is contained in:
@@ -1304,10 +1304,10 @@ func decompressContent(content string, headers map[string]string) string {
|
||||
if err != nil {
|
||||
return content // Return original on error
|
||||
}
|
||||
defer reader.Close()
|
||||
defer func() { _ = reader.Close() }()
|
||||
case "deflate":
|
||||
reader = flate.NewReader(bytes.NewReader(data))
|
||||
defer reader.Close()
|
||||
defer func() { _ = reader.Close() }()
|
||||
default:
|
||||
// br (brotli), compress, zstd - not in stdlib, return original
|
||||
return content
|
||||
|
||||
Reference in New Issue
Block a user