Skip to content

Recover struct field tags for issue #37#97

Merged
stevemk14ebr merged 2 commits into
mandiant:masterfrom
kami922:issue-37-struct-tags
Jun 22, 2026
Merged

Recover struct field tags for issue #37#97
stevemk14ebr merged 2 commits into
mandiant:masterfrom
kami922:issue-37-struct-tags

Conversation

@kami922

@kami922 kami922 commented Jun 15, 2026

Copy link
Copy Markdown
Contributor

PR to recover struct field tags
includes tests and Implementation

closes #37

kami922 added 2 commits June 13, 2026 01:17
- Add TaggedStruct with exported, unexported, and untagged fields to testproject
- Add comprehensive tag test suite (positive + negative cases)
- Positive tests intentionally fail — implementation not yet written
- Extend readRTypeName to return (name, tag, err)
- Go 1.7-1.16: read flag byte from name_len_raw[0], extract tag after name bytes
- Go 1.17+: read flag byte separately, use distinct nameVarintLen/tagVarintLen to avoid shadowing
- Fix flag check: flag&(1<<1)!=0 instead of ==3, catches unexported fields with tags
- Wire tag into struct Reconstructed output in ParseType_impl
@stevemk14ebr stevemk14ebr merged commit f92fd31 into mandiant:master Jun 22, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

field tag and method name is not parsed

2 participants