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. --- uint16.go | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'uint16.go') diff --git a/uint16.go b/uint16.go index 182dc40..ec14ab0 100644 --- a/uint16.go +++ b/uint16.go @@ -18,10 +18,15 @@ func (i *uint16Value) Set(s string) error { *i = uint16Value(v) return err } + func (i *uint16Value) Get() interface{} { return uint16(*i) } +func (i *uint16Value) Type() string { + return "uint16" +} + // Uint16Var defines a uint flag with specified name, default value, and usage string. // The argument p points to a uint variable in which to store the value of the flag. func (f *FlagSet) Uint16Var(p *uint16, name string, value uint16, usage string) { -- cgit v1.2.3