fix: resolve hints
All checks were successful
Build and Push Docker Image / Build-And-Push-Docker-Image (push) Successful in 3m35s

This commit is contained in:
2025-12-23 20:17:47 +01:00
parent 677c6b795e
commit 1e61b765ae

View File

@@ -79,8 +79,8 @@ func (handler DashboardImpl) handleDashboardMainChart() http.HandlerFunc {
savingsBuilder := strings.Builder{}
for _, entry := range series {
accountBuilder.WriteString(fmt.Sprintf(`["%s",%.2f],`, entry.Day.Format(time.RFC3339), float64(entry.Value)/100))
savingsBuilder.WriteString(fmt.Sprintf(`["%s",%.2f],`, entry.Day.Format(time.RFC3339), float64(entry.Savings)/100))
fmt.Fprintf(&accountBuilder, `["%s",%.2f],`, entry.Day.Format(time.RFC3339), float64(entry.Value)/100)
fmt.Fprintf(&savingsBuilder, `["%s",%.2f],`, entry.Day.Format(time.RFC3339), float64(entry.Savings)/100)
}
account := accountBuilder.String()
@@ -148,15 +148,15 @@ func (handler DashboardImpl) handleDashboardTreasureChests() http.HandlerFunc {
for _, child := range item.Children {
if child.Value < 0 {
childrenBuilder.WriteString(fmt.Sprintf(`{"name":"%s\n%.2f €","value":%d},`, child.Name, float64(child.Value)/100, -child.Value))
fmt.Fprintf(&childrenBuilder, `{"name":"%s\n%.2f €","value":%d},`, child.Name, float64(child.Value)/100, -child.Value)
} else {
childrenBuilder.WriteString(fmt.Sprintf(`{"name":"%s\n%.2f €","value":%d},`, child.Name, float64(child.Value)/100, child.Value))
fmt.Fprintf(&childrenBuilder, `{"name":"%s\n%.2f €","value":%d},`, child.Name, float64(child.Value)/100, child.Value)
}
}
children := childrenBuilder.String()
children = children[:len(children)-1]
dataBuilder.WriteString(fmt.Sprintf(`{"name":"%s","children":[%s]},`, item.Name, children))
fmt.Fprintf(&dataBuilder, `{"name":"%s","children":[%s]},`, item.Name, children)
}
data := dataBuilder.String()
data = data[:len(data)-1]
@@ -212,7 +212,7 @@ func (handler DashboardImpl) handleDashboardTreasureChest() http.HandlerFunc {
valueBuilder := strings.Builder{}
for _, entry := range series {
valueBuilder.WriteString(fmt.Sprintf(`["%s",%.2f],`, entry.Day.Format(time.RFC3339), float64(entry.Value)/100))
fmt.Fprintf(&valueBuilder, `["%s",%.2f],`, entry.Day.Format(time.RFC3339), float64(entry.Value)/100)
}
value := valueBuilder.String()