chore: fix lint issues

This commit is contained in:
Abhishek Kumar Singh
2026-03-12 21:51:13 +05:30
parent 03901b353b
commit 388a1184ca
2 changed files with 2 additions and 3 deletions

View File

@@ -2,7 +2,6 @@ package alertmanagertemplate
import (
"context"
"io"
"log/slog"
"testing"
"time"
@@ -25,7 +24,7 @@ func testSetup(t *testing.T) (*template.Template, context.Context, *slog.Logger)
ctx = notify.WithGroupKey(ctx, "test-group")
ctx = notify.WithReceiverName(ctx, "slack")
ctx = notify.WithGroupLabels(ctx, model.LabelSet{"alertname": "HighCPU", "severity": "critical"})
logger := slog.New(slog.NewTextHandler(io.Discard, nil))
logger := slog.New(slog.DiscardHandler)
return tmpl, ctx, logger
}

View File

@@ -28,7 +28,7 @@ func TestExtractFieldMappings(t *testing.T) {
}{
{
name: "struct with mixed field types",
data: TestStruct{Name: "test", Count: 5},
data: TestStruct{Name: "test", Count: 5, unexported: ""},
expected: []fieldMapping{
{VarName: "name", FieldName: "Name"},
{VarName: "status", FieldName: "Status"},