Skip to content

Commit 9830a74

Browse files
committed
Fix some vet issues
Signed-off-by: R.I.Pienaar <[email protected]>
1 parent afe81c5 commit 9830a74

File tree

2 files changed

+8
-6
lines changed

2 files changed

+8
-6
lines changed

audit/gather/gather.go

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,8 @@ type profileConfiguration struct {
7373
debug int
7474
}
7575

76+
func (p *profileConfiguration) Name() string { return p.name }
77+
7678
func NewCaptureConfiguration() *Configuration {
7779
return &Configuration{
7880
LogLevel: api.InfoLevel,
@@ -500,12 +502,12 @@ func (g *gather) captureServerProfiles(serverInfoMap map[string]*server.ServerIn
500502

501503
responses, err := g.doReq(context.TODO(), payload, subject, 1)
502504
if err != nil {
503-
g.log.Errorf("Failed to request %s (%d) profile from server %s: %s", profile.name, profile.debug, serverName, err)
505+
g.log.Errorf("Failed to request %v (%d) profile from server %s: %s", profile, profile.debug, serverName, err)
504506
continue
505507
}
506508

507509
if len(responses) != 1 {
508-
g.log.Errorf("Unexpected number of responses to %s profile from server %s: %d", profile, serverName, len(responses))
510+
g.log.Errorf("Unexpected number of responses to %v profile from server %s: %d", profile, serverName, len(responses))
509511
continue
510512
}
511513

@@ -518,17 +520,17 @@ func (g *gather) captureServerProfiles(serverInfoMap map[string]*server.ServerIn
518520
}
519521

520522
if err = json.Unmarshal(responseBytes, &apiResponse); err != nil {
521-
g.log.Errorf("Failed to deserialize %s profile response from server %s: %s", profile, serverName, err)
523+
g.log.Errorf("Failed to deserialize %v profile response from server %s: %s", profile, serverName, err)
522524
continue
523525
}
524526
if apiResponse.Error != nil {
525-
g.log.Errorf("Failed to retrieve %s profile from server %s: %s", profile, serverName, apiResponse.Error.Description)
527+
g.log.Errorf("Failed to retrieve %v profile from server %s: %s", profile, serverName, apiResponse.Error.Description)
526528
continue
527529
}
528530

529531
profileStatus := apiResponse.Data
530532
if profileStatus.Error != "" {
531-
g.log.Errorf("Failed to retrieve %s profile from server %s: %s", profile, serverName, profileStatus.Error)
533+
g.log.Errorf("Failed to retrieve %v profile from server %s: %s", profile, serverName, profileStatus.Error)
532534
continue
533535
}
534536

audit/jetstream_checks.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,7 @@ func checkStreamHighCardinality(check *Check, r *archive.Reader, examples *Examp
218218
}
219219

220220
if examples.Count() > 0 {
221-
log.Errorf("Found %d streams with subjects cardinality exceeding %s", examples.Count(), numSubjectsThreshold)
221+
log.Errorf("Found %d streams with subjects cardinality exceeding %f", examples.Count(), numSubjectsThreshold)
222222
return PassWithIssues, nil
223223
}
224224

0 commit comments

Comments
 (0)