Open pivotaljohn opened 4 years ago
To the uninitiated, this may be the first time the user learns that there are such things as dictionaries in ytt (via Starlark) — in contrast to structs (which are similar in nature, being key-value pairs). Users are introduced to structs immediately, but often discover ytt's dictionaries through use or study.
Thoughts on an evergreen hyperlink to documentation specifically clarifying the the presence and purpose of structs and dictionaries in ytt?
i think this is a bit better:
ytt: Error:
- dict has no .pks_subnet_ids field or method (hint: use bracket notation to access fields in dictionaries e.g. x.pks_subnet_ids should be x["pks_subnet_ids"])
Sometimes, a user may not realize they are dealing with a Starlark dictionary and attempt to access it using attribute notation (as if it were a struct). When this happens, let's give them a helping hint.
For example:
stable_config.json
cluster-template-paving.yaml
yields...
Let's drop them a hint: