Toggles, Loops, and What Counts as False
Make a chart that can be installed two ways, generate a set of objects from a map, and meet Go's idea of truth — which costs people a production outage roughly once per career.
Skill labintermediate~35 minFree
What you'll do
- ✓Guard an object with a values toggle that defaults to off
- ✓Generate one object per key of a map
- ✓Render nothing, correctly, when a map is empty
- ✓Know which values a Go template treats as false
Lab outline
- 01A toggle
- 02A loop
Before you start
- Helpers, Labels, and the Field You Cannot Change
Every lab runs on a real machine of your own in the browser — no installs, nothing to clean up — and checks your work automatically as you go.