mirror of
https://github.com/moonD4rk/HackBrowserData.git
synced 2026-05-27 19:22:22 +02:00
chore: update CI, golangci-lint, and CLAUDE.md (#511)
* chore: update CI, golangci-lint, and CLAUDE.md * fix: resolve CI failures on Windows test and lint * fix: resolve Windows test path and main.go line length lint issues * fix: auto-format log/ with gofumpt, exclude pre-refactoring lint issues * fix: resolve remaining lint issues, remove unnecessary exclusions * fix: remove invalid G117 gosec rule, use text exclusion for secret pattern * fix: align CI golangci-lint version with local (v2.4 -> v2.10)
This commit is contained in:
+29
-33
@@ -22,20 +22,18 @@ type baseTestCase struct {
|
||||
wantedPattern string
|
||||
}
|
||||
|
||||
var (
|
||||
baseTestCases = []baseTestCase{
|
||||
{
|
||||
description: "without trailing newline, logger adds newline",
|
||||
message: "hello, hacker!",
|
||||
suffix: "",
|
||||
},
|
||||
{
|
||||
description: "with trailing newline, logger preserves newline",
|
||||
message: "hello, hacker!",
|
||||
suffix: "\n",
|
||||
},
|
||||
}
|
||||
)
|
||||
var baseTestCases = []baseTestCase{
|
||||
{
|
||||
description: "without trailing newline, logger adds newline",
|
||||
message: "hello, hacker!",
|
||||
suffix: "",
|
||||
},
|
||||
{
|
||||
description: "with trailing newline, logger preserves newline",
|
||||
message: "hello, hacker!",
|
||||
suffix: "\n",
|
||||
},
|
||||
}
|
||||
|
||||
func TestLoggerDebug(t *testing.T) {
|
||||
for _, tc := range baseTestCases {
|
||||
@@ -121,25 +119,23 @@ type formatTestCase struct {
|
||||
wantedPattern string
|
||||
}
|
||||
|
||||
var (
|
||||
formatTestCases = []formatTestCase{
|
||||
{
|
||||
description: "message with format prefix",
|
||||
format: "hello, %s!",
|
||||
args: []any{"Hacker"},
|
||||
},
|
||||
{
|
||||
description: "message with format prefix",
|
||||
format: "hello, %d,%d,%d!",
|
||||
args: []any{1, 2, 3},
|
||||
},
|
||||
{
|
||||
description: "message with format prefix",
|
||||
format: "hello, %s,%d,%d!",
|
||||
args: []any{"Hacker", 2, 3},
|
||||
},
|
||||
}
|
||||
)
|
||||
var formatTestCases = []formatTestCase{
|
||||
{
|
||||
description: "message with format prefix",
|
||||
format: "hello, %s!",
|
||||
args: []any{"Hacker"},
|
||||
},
|
||||
{
|
||||
description: "message with format prefix",
|
||||
format: "hello, %d,%d,%d!",
|
||||
args: []any{1, 2, 3},
|
||||
},
|
||||
{
|
||||
description: "message with format prefix",
|
||||
format: "hello, %s,%d,%d!",
|
||||
args: []any{"Hacker", 2, 3},
|
||||
},
|
||||
}
|
||||
|
||||
func TestLoggerDebugf(t *testing.T) {
|
||||
for _, tc := range formatTestCases {
|
||||
|
||||
Reference in New Issue
Block a user