Support Embedded Struct Pointers
- Dominant language
- Go
- Stars
- 5.8k
- Forks
- 657
- Avg merge
- 20h 36m
- Merged PRs (30d)
- 6
Description
For my use case this works by simply adding `&& fieldKind != reflect.Ptr` to https://github.com/hashicorp/hcl/blob/cc08d3d56ad27fc4afd58bd8ad4ae2cfbcab2f7c/decoder.go#L458. Embedded structs pointers are considered anonymous, but this works just fine if that conditional is relaxed a bit (at least in my tests).
Contributor guide
No contributing guide indexed for this repository
Research direction
Read decoder.go at line 458 and trace how anonymous embedded fields are handled before changing anything. Verify that embedded struct pointers decode correctly without breaking existing behavior by running the relevant tests or the repository test suite; done means the reported use case passes.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- backend
- Issue type
- Feature
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 48/100