Skip to content

Commit

Permalink
fix(dashboard): resolved lint issues
Browse files Browse the repository at this point in the history
  • Loading branch information
vinay-newrelic committed Nov 22, 2024
1 parent 809b0f1 commit a03bf1f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions internal/utils/terraform/dashboard.go
Original file line number Diff line number Diff line change
Expand Up @@ -332,12 +332,12 @@ func requireValidVisualizationID(id string) {
}

func writeInterfaceValues(h *HCLGen, title string, titleValue interface{}) {
switch titleValue.(type) {
switch titleValue := titleValue.(type) {
case string:
h.WriteStringAttribute(title, fmt.Sprintf("%s", titleValue)) // string without quotes

Check failure on line 337 in internal/utils/terraform/dashboard.go

View workflow job for this annotation

GitHub Actions / lint

S1025: the argument is already a string, there's no need to use fmt.Sprintf (gosimple)
case float64:
h.WriteFloatAttribute(title, titleValue.(float64)) // integer without quotes
h.WriteFloatAttribute(title, titleValue) // integer without quotes
default:
h.WriteStringAttribute(title, fmt.Sprintf("%s", ""))
h.WriteStringAttribute(title, "")
}
}

0 comments on commit a03bf1f

Please sign in to comment.