Skip to content

Commit

Permalink
internal/core: use strconv for uint to str
Browse files Browse the repository at this point in the history
  • Loading branch information
talal committed Oct 23, 2023
1 parent 04024b0 commit 5c087d8
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions internal/core/humanize.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
package core

import (
"fmt"
"math"
"sort"
"strconv"
Expand Down Expand Up @@ -72,7 +71,7 @@ func convertValue(v uint64, source, target limes.Unit) string {
// string.
type valToStrFunc func(v uint64) string

var defaultValToStrFunc valToStrFunc = func(v uint64) string { return fmt.Sprintf("%d", v) }
var defaultValToStrFunc valToStrFunc = func(v uint64) string { return strconv.FormatUint(v, 10) }

// getValToStrFunc finds a human friendly unit for the given vals and returns a
// function that can be used to convert resource values to this new unit.
Expand Down

0 comments on commit 5c087d8

Please sign in to comment.