not_a_struct

Diagnostic `nanook::template::not_a_struct`

Summary

cannot access `.{1}` on `{0}` — not a struct

Details

When this fires

You used .field on a value that isn't a struct. Often the value is a map (use ["field"]) or a scalar that doesn't have fields at all. Raised by the renderer when peek.into_struct() fails.

What to check

Swap .foo for ["foo"] when the owner is a map (annotations, labels, custom user data). See @/docs/nanook-templates.md for which parts of the trigger context are structs vs. maps.

broken: {{ trigger.labels.env }}
fixed:  {{ trigger.labels["env"] }}
broken: {{ trigger.value.unit }}
fixed:  {{ trigger.unit }}