aboutsummaryrefslogtreecommitdiff
path: root/int.go
diff options
context:
space:
mode:
authorspf13 <[email protected]>2014-07-11 10:25:27 -0400
committerspf13 <[email protected]>2014-07-11 10:25:27 -0400
commit463bdc838f2b35e9307e91d480878bda5fff7232 (patch)
treecb01b60a27df6601aa01c06791bec65e0c2674b4 /int.go
parentb02196a78893a71903e9ad98359e7f891b1e7781 (diff)
Adding Type() method to the values.
Diffstat (limited to 'int.go')
-rw-r--r--int.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/int.go b/int.go
index cb85e14..dca9da6 100644
--- a/int.go
+++ b/int.go
@@ -19,6 +19,10 @@ func (i *intValue) Set(s string) error {
return err
}
+func (i *intValue) Type() string {
+ return "int"
+}
+
func (i *intValue) String() string { return fmt.Sprintf("%v", *i) }
// IntVar defines an int flag with specified name, default value, and usage string.