mirror of
https://github.com/lukaszraczylo/kportal.git
synced 2026-06-13 02:12:35 +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:
@@ -160,7 +160,7 @@ func TestNewLogger(t *testing.T) {
|
||||
require.NoError(t, err)
|
||||
require.NotNil(t, l)
|
||||
assert.Nil(t, l.file) // No file when using stdout
|
||||
l.Close()
|
||||
_ = l.Close()
|
||||
|
||||
// Test file logger (using temp file)
|
||||
tmpFile := t.TempDir() + "/test.log"
|
||||
@@ -173,7 +173,7 @@ func TestNewLogger(t *testing.T) {
|
||||
err = l.Log(Entry{Direction: "request", Method: "GET"})
|
||||
require.NoError(t, err)
|
||||
|
||||
l.Close()
|
||||
_ = l.Close()
|
||||
|
||||
// Verify file has content
|
||||
data, err := os.ReadFile(tmpFile)
|
||||
|
||||
Reference in New Issue
Block a user