aboutsummaryrefslogtreecommitdiff
path: root/vendor/github.com/spf13/pflag/float64.go
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/github.com/spf13/pflag/float64.go')
-rw-r--r--vendor/github.com/spf13/pflag/float64.go7
1 files changed, 2 insertions, 5 deletions
diff --git a/vendor/github.com/spf13/pflag/float64.go b/vendor/github.com/spf13/pflag/float64.go
index 50fbf8c..04b5492 100644
--- a/vendor/github.com/spf13/pflag/float64.go
+++ b/vendor/github.com/spf13/pflag/float64.go
@@ -1,9 +1,6 @@
package pflag
-import (
- "fmt"
- "strconv"
-)
+import "strconv"
// -- float64 Value
type float64Value float64
@@ -23,7 +20,7 @@ func (f *float64Value) Type() string {
return "float64"
}
-func (f *float64Value) String() string { return fmt.Sprintf("%v", *f) }
+func (f *float64Value) String() string { return strconv.FormatFloat(float64(*f), 'g', -1, 64) }
func float64Conv(sval string) (interface{}, error) {
return strconv.ParseFloat(sval, 64)