Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
Golang http/template には代替機能、if構造がありますが、構造は見つかりませんでしたfor。スライスを反復するにはどうすればよいですか? このような:
if
for
{{for x in xs}} Hello, {{x.Name}}! {{end}}
使用するrange
range
{{range xs}} Hello, {{.Name}}! {{end}}