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. --- ip.go | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'ip.go') diff --git a/ip.go b/ip.go index 3a411fc..9d53bd3 100644 --- a/ip.go +++ b/ip.go @@ -26,6 +26,10 @@ func (i *ipValue) Get() interface{} { return net.IP(*i) } +func (i *ipValue) Type() string { + return "ip" +} + // IPVar defines an net.IP flag with specified name, default value, and usage string. // The argument p points to an net.IP variable in which to store the value of the flag. func (f *FlagSet) IPVar(p *net.IP, name string, value net.IP, usage string) { -- cgit v1.2.3