collections collections.In 报告某个值是否存在于给定的切片或字符串中。 签名 collections.In SLICE|STRING VALUE 返回类型 bool 别名 in {{ $s := slice "a" "b" "c" }} {{ in $s "b" }} → true{{ $s := "abc" }} {{ in $s "b" }} → true ← 上一篇:group 下一篇:index →