aboutsummaryrefslogtreecommitdiff
path: root/text.go
diff options
context:
space:
mode:
Diffstat (limited to 'text.go')
-rw-r--r--text.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/text.go b/text.go
index 3726606..886d5a3 100644
--- a/text.go
+++ b/text.go
@@ -55,7 +55,7 @@ func (f *FlagSet) GetText(name string, out encoding.TextUnmarshaler) error {
return fmt.Errorf("flag accessed but not defined: %s", name)
}
if flag.Value.Type() != reflect.TypeOf(out).Name() {
- fmt.Errorf("trying to get %s value of flag of type %s", reflect.TypeOf(out).Name(), flag.Value.Type())
+ return fmt.Errorf("trying to get %s value of flag of type %s", reflect.TypeOf(out).Name(), flag.Value.Type())
}
return out.UnmarshalText([]byte(flag.Value.String()))
}