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.
所以问题是我无法在我的视图文件中显示元素。我的视图文件中有以下代码:
{{范围 $i, $stream := .d}} {{如果 $i % 2 == 0}} {{$stream.Channel.Status}} {{结尾}} {{结尾}}
从我读过的文档中我读到“你不能在 if 中使用条件表达式。只有布尔值是可接受的。”
那么我该如何实现呢?
提前致谢