symdiff

将以下英文翻译为中文:

symdiff

https://gohugo.io/functions/symdiff/

collections.SymDiff (alias symdiff) returns the symmetric difference of two collections.

语法

COLLECTION | symdiff COLLECTION

Example:

1
{{ slice 1 2 3 | symdiff (slice 3 4) }}

The above will print [1 2 4].

Also see https://en.wikipedia.org/wiki/Symmetric_difference

另请参阅