hugo-theme-casper icon indicating copy to clipboard operation
hugo-theme-casper copied to clipboard

There's no "union" function, use "intersect"

Open mem opened this issue 7 years ago • 3 comments

Even if the documentation says there's an "union" function that computes the union of two sets, looking at Hugo's source code, there's no such function.

Use "intersect" instead. It's more appropriate, too, because it will eliminate duplicates in the two lists, if there are any.

Signed-off-by: Marcelo E. Magallon [email protected]

mem avatar Jan 11 '18 15:01 mem

Sorry, I didn't realize I had an old hugo binary in my path :-(

But I still think it's better to use intersect than union. Would you like me to correct the commit message?

mem avatar Jan 11 '18 16:01 mem

Are you sure the behaviour of intersect == Union ?

vjeantet avatar Jan 17 '18 07:01 vjeantet

The functions are absolutely not equivalent. See https://gohugo.io/functions/intersect/ and https://gohugo.io/functions/union/.

mceachen avatar Apr 13 '19 04:04 mceachen