diff options
Diffstat (limited to 'pkg/binstruct/l2.go')
-rw-r--r-- | pkg/binstruct/l2.go | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/pkg/binstruct/l2.go b/pkg/binstruct/l2.go index 32aa313..c9b9a9c 100644 --- a/pkg/binstruct/l2.go +++ b/pkg/binstruct/l2.go @@ -117,9 +117,8 @@ func genStructHandler(structInfo reflect.Type) (handler, error) { type tag struct { skip bool - off int64 - siz int64 - desc string + off int64 + siz int64 } func parseStructTag(str string) (tag, error) { @@ -151,8 +150,8 @@ func parseStructTag(str string) (tag, error) { return tag{}, err } ret.siz = vint - case "desc": - ret.desc = val + default: + return tag{}, fmt.Errorf("unrecognized option %q", key) } } return ret, nil |