aboutsummaryrefslogtreecommitdiff
path: root/example_test.go
diff options
context:
space:
mode:
authorFilipe Brandenburger <[email protected]>2015-01-16 11:24:28 -0800
committerFilipe Brandenburger <[email protected]>2015-01-16 11:24:28 -0800
commit99bcedf5411e47380739c8999a6ae3fdd0739fa3 (patch)
treeb3f8388f0b6d1ea1023205fa391beb3b1606a635 /example_test.go
parent463bdc838f2b35e9307e91d480878bda5fff7232 (diff)
Fix unit tests to include Type() method in custom types
This was broken by commit 463bdc838f2b35 ("Adding Type() method to the values.") which added the method to the interface but did not update the custom types in unit tests. Signed-off-by: Filipe Brandenburger <[email protected]>
Diffstat (limited to 'example_test.go')
-rw-r--r--example_test.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/example_test.go b/example_test.go
index 03ebeaa..6aaed3c 100644
--- a/example_test.go
+++ b/example_test.go
@@ -29,6 +29,10 @@ func (i *interval) String() string {
return fmt.Sprint(*i)
}
+func (i *interval) Type() string {
+ return "interval"
+}
+
// Set is the method to set the flag value, part of the flag.Value interface.
// Set's argument is a string to be parsed to set the flag.
// It's a comma-separated list, so we split it.