Skip to content

Commit

Permalink
fix lint
Browse files Browse the repository at this point in the history
  • Loading branch information
juandspy committed Aug 26, 2024
1 parent fc122d4 commit d873638
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 5 deletions.
4 changes: 2 additions & 2 deletions differ/comparator.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ import (

// Messages
const (
clusterName = "cluster"
clusterStr = "cluster"
resolutionKey = "resolution"
resolutionMsg = "Should notify user"
resolutionReason = "reason"
Expand Down Expand Up @@ -116,7 +116,7 @@ func updateNotificationRecordSentState(storage Storage, cluster types.ClusterEnt
}

func updateNotificationRecordErrorState(storage Storage, err error, cluster types.ClusterEntry, report types.ClusterReport, notifiedAt types.Timestamp, eventTarget types.EventTarget) {
log.Error().Err(err).Str("cluster", string(cluster.ClusterName)).Msg("New issues couldn't be notified")
log.Error().Err(err).Str(clusterStr, string(cluster.ClusterName)).Msg("New issues couldn't be notified")
NotificationNotSentErrorState.Inc()
err = storage.WriteNotificationRecordForCluster(cluster, notificationTypes.Instant, states.ErrorState, report, notifiedAt, err.Error(), eventTarget)
if err != nil {
Expand Down
3 changes: 1 addition & 2 deletions differ/renderer.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,7 @@ func renderReportsForCluster(
clusterName types.ClusterName,
reports types.ReportContent,
ruleContent types.Rules) ([]types.RenderedReport, error) {

log.Debug().Str("cluster", string(clusterName)).Msg("RenderReportsForCluster")
log.Debug().Str(clusterStr, string(clusterName)).Msg("RenderReportsForCluster")

req, err := createTemplateRendererRequest(ruleContent, reports, clusterName, config.TemplateRendererURL)
if err != nil {
Expand Down
2 changes: 1 addition & 1 deletion differ/storage.go
Original file line number Diff line number Diff line change
Expand Up @@ -611,7 +611,7 @@ func (storage DBStorage) WriteReadError(
if err != nil {
log.Err(err).
Int("org", int(orgID)).
Str("cluster", string(clusterName)).
Str(clusterStr, string(clusterName)).
Str("last checked", lastCheckedTime.String()).
Str("created at", createdAt.String()).
Str("error text", errorText).
Expand Down

0 comments on commit d873638

Please sign in to comment.