diff options
| author | Eric Paris <[email protected]> | 2016-09-15 11:31:01 -0400 |
|---|---|---|
| committer | GitHub <[email protected]> | 2016-09-15 11:31:01 -0400 |
| commit | c7e63cf4530bcd3ba943729cee0efeff2ebea63f (patch) | |
| tree | 49309d3c76fea4ccdc96e849bf1bed1d834a1bf1 /string.go | |
| parent | 7b17cc4658ef5ca157b986ea5c0b43af7938532b (diff) | |
| parent | d16d05ecad8d146ef127c975e2e3e167b6e38ad6 (diff) | |
Merge pull request #93 from bogem/flagStrings
Use strconv instead of fmt in some values' String funcs
Diffstat (limited to 'string.go')
| -rw-r--r-- | string.go | 4 |
1 files changed, 1 insertions, 3 deletions
@@ -1,7 +1,5 @@ package pflag -import "fmt" - // -- string Value type stringValue string @@ -18,7 +16,7 @@ func (s *stringValue) Type() string { return "string" } -func (s *stringValue) String() string { return fmt.Sprintf("%s", *s) } +func (s *stringValue) String() string { return string(*s) } func stringConv(sval string) (interface{}, error) { return sval, nil |
