あかんやつ
Can I access index directly?
the second is: {{.Bars[1]}}
panic: template: :2: unexpected bad character U+005B '[' in command
ヒィィ
うごくやつ
Can I access index directly?
the second is: {{index .Bars 1}}
リファレンス
教訓
- text/templateのほうのドキュメントを参照しましょうね
DRY