aboutsummaryrefslogtreecommitdiff
path: root/uint16.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 /uint16.go
parentb02196a78893a71903e9ad98359e7f891b1e7781 (diff)
Adding Type() method to the values.
Diffstat (limited to 'uint16.go')
-rw-r--r--uint16.go5
1 files changed, 5 insertions, 0 deletions
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) {