enhance structs to support iteration, bracket accessor, ...
- Dominant language
- Go
- Stars
- 1.9k
- Forks
- 167
- PR merge metrics
- No merged PRs in 30d
Description
currently we use struct package provided by starlark. it seems that it lacks few things that would make it friendlier to use (especially for case of data.values).
- [ ] support iteration (e.g. `for k in st`)
- [ ] support [] accessor (e.g. st["foo"] in addition to st.foo)
- [ ] `in` check (e.g. `"foo" in st`)
- [ ] anything else that we have done for yaml fragments https://github.com/k14s/ytt/blob/develop/pkg/yamltemplate/starlark_fragment.go?
Contributor guide
Research direction
Start by examining how the current Starlark struct package is used, then compare its behavior with pkg/yamltemplate/starlark_fragment.go. Define the supported behavior for iteration, [] access, membership checks, and any additional YAML-fragment behavior; the work is done when the requested struct operations are supported and verified.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- cli
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100