commit | a8cab0163d48558ffd77076c9c99388529766f63 | [log] [tgz] |
---|---|---|
author | Jesse van den Kieboom <jessevdk@gmail.com> | Sat Aug 27 13:23:33 2016 +0200 |
committer | Jesse van den Kieboom <jessevdk@gmail.com> | Sat Aug 27 13:23:33 2016 +0200 |
tree | 7e1b85765b24e5848f229e9048fdb8def4782e5a | |
parent | 1cf69fa2b27507ce2e890ac9be4829726c1e3afd [diff] |
Add accessor for struct field of the option
diff --git a/option.go b/option.go index 934ea72..17a2189 100644 --- a/option.go +++ b/option.go
@@ -169,6 +169,11 @@ return option.value.Interface() } +// Field returns the reflect struct field of the option. +func (option *Option) Field() reflect.StructField { + return option.field +} + // IsSet returns true if option has been set func (option *Option) IsSet() bool { return option.isSet