aboutsummaryrefslogtreecommitdiff
path: root/int8.go
diff options
context:
space:
mode:
authorEric Paris <[email protected]>2016-09-15 11:31:01 -0400
committerGitHub <[email protected]>2016-09-15 11:31:01 -0400
commitc7e63cf4530bcd3ba943729cee0efeff2ebea63f (patch)
tree49309d3c76fea4ccdc96e849bf1bed1d834a1bf1 /int8.go
parent7b17cc4658ef5ca157b986ea5c0b43af7938532b (diff)
parentd16d05ecad8d146ef127c975e2e3e167b6e38ad6 (diff)
Merge pull request #93 from bogem/flagStrings
Use strconv instead of fmt in some values' String funcs
Diffstat (limited to 'int8.go')
-rw-r--r--int8.go7
1 files changed, 2 insertions, 5 deletions
diff --git a/int8.go b/int8.go
index 400db21..4da9222 100644
--- a/int8.go
+++ b/int8.go
@@ -1,9 +1,6 @@
package pflag
-import (
- "fmt"
- "strconv"
-)
+import "strconv"
// -- int8 Value
type int8Value int8
@@ -23,7 +20,7 @@ func (i *int8Value) Type() string {
return "int8"
}
-func (i *int8Value) String() string { return fmt.Sprintf("%v", *i) }
+func (i *int8Value) String() string { return strconv.FormatInt(int64(*i), 10) }
func int8Conv(sval string) (interface{}, error) {
v, err := strconv.ParseInt(sval, 0, 8)