mirror of
https://github.com/SigNoz/signoz.git
synced 2026-03-13 08:13:22 +08:00
chore: fix lint issues
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
|
||||
@@ -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"},
|
||||
|
||||
Reference in New Issue
Block a user