summaryrefslogtreecommitdiff
path: root/libpod/util.go
diff options
context:
space:
mode:
Diffstat (limited to 'libpod/util.go')
-rw-r--r--libpod/util.go20
1 files changed, 0 insertions, 20 deletions
diff --git a/libpod/util.go b/libpod/util.go
index 6457dac1c..bdfd153ed 100644
--- a/libpod/util.go
+++ b/libpod/util.go
@@ -9,12 +9,10 @@ import (
"os/exec"
"path/filepath"
"sort"
- "strconv"
"strings"
"time"
"github.com/containers/common/pkg/config"
-
"github.com/containers/libpod/libpod/define"
"github.com/containers/libpod/utils"
"github.com/fsnotify/fsnotify"
@@ -36,24 +34,6 @@ func FuncTimer(funcName string) {
fmt.Printf("%s executed in %d ms\n", funcName, elapsed)
}
-// RemoveScientificNotationFromFloat returns a float without any
-// scientific notation if the number has any.
-// golang does not handle conversion of float64s that have scientific
-// notation in them and otherwise stinks. please replace this if you have
-// a better implementation.
-func RemoveScientificNotationFromFloat(x float64) (float64, error) {
- bigNum := strconv.FormatFloat(x, 'g', -1, 64)
- breakPoint := strings.IndexAny(bigNum, "Ee")
- if breakPoint > 0 {
- bigNum = bigNum[:breakPoint]
- }
- result, err := strconv.ParseFloat(bigNum, 64)
- if err != nil {
- return x, errors.Wrapf(err, "unable to remove scientific number from calculations")
- }
- return result, nil
-}
-
// MountExists returns true if dest exists in the list of mounts
func MountExists(specMounts []spec.Mount, dest string) bool {
for _, m := range specMounts {