Serialize hcl.Body to send over wire protocol for processing elsewhere
- Dominant language
- Go
- Stars
- 5.8k
- Forks
- 657
- Avg merge
- 20h 36m
- Merged PRs (30d)
- 6
Description
Just recording these somewhere, not urgent, things I'm noticing.
If we partially decode using `gohcl` into a `remain` attribute, we're left with an `hcl.Body`. Today, you can decode that with `gohcl` (nice, easy) or with `hcldec` (hard, requires spec creation and knowledge of cty). `hclwrite` is a package for constructing HCL and doing surgical changes, leaning on the "advanced" side.
What I'd like to propose is a middleground where a given `hcl.Body` can be rendered to at least raw HCL text if not JSON as well. This would allow partial HCL configurations to be serialized/persisted in a non-binary form.
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by comparing the existing gohcl, hcldec, and hclwrite handling of hcl.Body; the issue names no files or tests. Clarify whether the serialization target is raw HCL, JSON, or both, then define how partial bodies should be persisted or sent in a non-binary form.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- backend-api-design
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100