Skip to content

Commit 975d9b9

Browse files
authored
lints
Signed-off-by: Evan Baker <[email protected]>
1 parent 7b10cb3 commit 975d9b9

File tree

4 files changed

+5
-5
lines changed

4 files changed

+5
-5
lines changed

cns/logger/v2/config.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ func (c *Config) UnmarshalJSON(data []byte) error {
3131
}{
3232
Alias: (*Alias)(c),
3333
}
34-
if err := json.Unmarshal(data, &aux); err != nil {
34+
if err := json.Unmarshal(data, &aux); err != nil { //nolint:musttag // doesn't understand the embedding strategy
3535
return errors.Wrap(err, "failed to unmarshal Config")
3636
}
3737
lvl, err := zapcore.ParseLevel(c.Level)

cns/logger/v2/cores/ai_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,10 @@ func TestAIConfigUnmarshalJSON(t *testing.T) {
2020
name: "valid",
2121
have: []byte(`{"grace_period":"30s","level":"panic","max_batch_interval":"30s","max_batch_size":32000}`),
2222
want: &AppInsightsConfig{
23-
GracePeriod: time.Duration{30 * time.Second},
23+
GracePeriod: time.Duration{Duration: 30 * time.Second},
2424
Level: "panic",
2525
level: zapcore.PanicLevel,
26-
MaxBatchInterval: time.Duration{30 * time.Second},
26+
MaxBatchInterval: time.Duration{Duration: 30 * time.Second},
2727
MaxBatchSize: 32000,
2828
},
2929
},

cns/logger/v2/logger_windows.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,5 +10,5 @@ func platformCore(cfg *Config) (zapcore.Core, func(), error) {
1010
if cfg.ETW == nil {
1111
return zapcore.NewNopCore(), func() {}, nil
1212
}
13-
return cores.ETWCore(cfg.ETW)
13+
return cores.ETWCore(cfg.ETW) //nolint:wrapcheck // ignore
1414
}

internal/time/duration.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import (
55
"time"
66
)
77

8-
const Second = time.Second
8+
const Second = time.Second //nolint:revive // it's not a suffix
99

1010
type Duration struct {
1111
time.Duration

0 commit comments

Comments
 (0)