diff options
author | Luke Shumaker <lukeshu@lukeshu.com> | 2022-05-11 18:54:40 -0600 |
---|---|---|
committer | Luke Shumaker <lukeshu@lukeshu.com> | 2022-05-11 18:54:40 -0600 |
commit | f39ce9ac2e5364a4966b3b88c00ecaee5cfd2111 (patch) | |
tree | 57983ed7c2b9aa96df1a4c6e4f434060d7ece6d6 /pkg/binstruct/l2.go | |
parent | c519ae6b97b63024dae8ee349fe1e4e47c3ad54f (diff) |
remove desc from binstruct
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 |