From f39ce9ac2e5364a4966b3b88c00ecaee5cfd2111 Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Wed, 11 May 2022 18:54:40 -0600 Subject: remove desc from binstruct --- pkg/binstruct/l2.go | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'pkg/binstruct/l2.go') 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 -- cgit v1.2.3-2-g168b