From 463bdc838f2b35e9307e91d480878bda5fff7232 Mon Sep 17 00:00:00 2001 From: spf13 Date: Fri, 11 Jul 2014 10:25:27 -0400 Subject: Adding Type() method to the values. --- int.go | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'int.go') 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. -- cgit v1.2.3