[data/values] Add support for omitting "data.values" when referencing values
- Dominant language
- Go
- Stars
- 1.9k
- Forks
- 167
- PR merge metrics
- No merged PRs in 30d
Description
ytt uses `data.values.myKey` to reference a value and `data.values.` is always the prefix for the keys. So we can let ytt treats `data.values.` as the default prefix, and instead uses `.myKey` to reference the value.
BTW the first line `#@ load("@ytt:data", "data")` (AFAIK is always the same in every template files) can also be omitted and make it default by ytt.
```
#@ load("@ytt:data", "data")
#@ some_list = [data.values.myKey, "item1"]
```
Contributor guide
Research direction
No files, tests, or entry points are named in the issue. Start by locating ytt's handling of data.values references and template loads, then determine how the proposed shorthand should interact with existing syntax. Done means both the data.values prefix and the repeated data load can be omitted without changing the resulting values.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go, yaml
- Domain
- cli, tooling
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100