perf: run perfsprint fixes

Signed-off-by: Ben Reedy <breed808@breed808.com>
This commit is contained in:
Ben Reedy
2024-05-13 09:18:14 +10:00
parent a49dee606b
commit 1239fbf719
9 changed files with 34 additions and 28 deletions

View File

@@ -1,6 +1,9 @@
package config
import "fmt"
import (
"fmt"
"strconv"
)
// flatten flattens the nested struct.
//
@@ -46,7 +49,7 @@ func flattenSlice(data []interface{}) map[string]string {
ret[fmt.Sprintf("%d,%s", idx, fk)] = fv
}
default:
ret[fmt.Sprint(idx)] = fmt.Sprint(typed)
ret[strconv.Itoa(idx)] = fmt.Sprint(typed)
}
}
return ret