<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Compare functions on Hugo</title><link>https://v0-122-0--gohugoio.netlify.app/functions/compare/</link><description>Recent content in Compare functions on Hugo</description><generator>Hugo -- gohugo.io</generator><language>en</language><atom:link href="https://v0-122-0--gohugoio.netlify.app/functions/compare/index.xml" rel="self" type="application/rss+xml"/><item><title>compare.Conditional</title><link>https://v0-122-0--gohugoio.netlify.app/functions/compare/conditional/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://v0-122-0--gohugoio.netlify.app/functions/compare/conditional/</guid><description>The CONTROL argument is a boolean value that indicates whether the function should return ARG1 or ARG2. If CONTROL is true, the function returns ARG1. Otherwise, the function returns ARG2.
{{ $qty := 42 }} {{ cond (le $qty 3) &amp;#34;few&amp;#34; &amp;#34;many&amp;#34; }} → many The CONTROL argument must be either true or false. To cast a non-boolean value to boolean, pass it through the not operator twice.
{{ cond (42 | not | not) &amp;#34;truthy&amp;#34; &amp;#34;falsy&amp;#34; }} → truthy {{ cond (&amp;#34;&amp;#34; | not | not) &amp;#34;truthy&amp;#34; &amp;#34;falsy&amp;#34; }} → falsy Unlike ternary operators in other languages, the cond function does not perform short-circuit evaluation.</description></item><item><title>compare.Default</title><link>https://v0-122-0--gohugoio.netlify.app/functions/compare/default/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://v0-122-0--gohugoio.netlify.app/functions/compare/default/</guid><description>The default function returns the second argument if set, else the first argument.
When the second argument is the boolean false value, the default function returns false. All other falsy values are considered unset.
In Go templates, the falsy values are false, 0, any nil pointer or interface value, and any array, slice, map, or string of length zero. Everything else is truthy.
To set a default value based on truthiness, use the or operator instead.</description></item><item><title>compare.Eq</title><link>https://v0-122-0--gohugoio.netlify.app/functions/compare/eq/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://v0-122-0--gohugoio.netlify.app/functions/compare/eq/</guid><description>{{ eq 1 1 }} → true {{ eq 1 2 }} → false {{ eq 1 1 1 }} → true {{ eq 1 1 2 }} → true {{ eq 1 2 1 }} → true {{ eq 1 2 2 }} → false</description></item><item><title>compare.Ge</title><link>https://v0-122-0--gohugoio.netlify.app/functions/compare/ge/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://v0-122-0--gohugoio.netlify.app/functions/compare/ge/</guid><description>{{ ge 1 1 }} → true {{ ge 1 2 }} → false {{ ge 2 1 }} → true {{ ge 1 1 1 }} → true {{ ge 1 1 2 }} → false {{ ge 1 2 1 }} → false {{ ge 1 2 2 }} → false {{ ge 2 1 1 }} → true {{ ge 2 1 2 }} → true {{ ge 2 2 1 }} → true</description></item><item><title>compare.Gt</title><link>https://v0-122-0--gohugoio.netlify.app/functions/compare/gt/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://v0-122-0--gohugoio.netlify.app/functions/compare/gt/</guid><description>{{ gt 1 1 }} → false {{ gt 1 2 }} → false {{ gt 2 1 }} → true {{ gt 1 1 1 }} → false {{ gt 1 1 2 }} → false {{ gt 1 2 1 }} → false {{ gt 1 2 2 }} → false {{ gt 2 1 1 }} → true {{ gt 2 1 2 }} → false {{ gt 2 2 1 }} → false</description></item><item><title>compare.Le</title><link>https://v0-122-0--gohugoio.netlify.app/functions/compare/le/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://v0-122-0--gohugoio.netlify.app/functions/compare/le/</guid><description>{{ le 1 1 }} → true {{ le 1 2 }} → true {{ le 2 1 }} → false {{ le 1 1 1 }} → true {{ le 1 1 2 }} → true {{ le 1 2 1 }} → true {{ le 1 2 2 }} → true {{ le 2 1 1 }} → false {{ le 2 1 2 }} → false {{ le 2 2 1 }} → false</description></item><item><title>compare.Lt</title><link>https://v0-122-0--gohugoio.netlify.app/functions/compare/lt/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://v0-122-0--gohugoio.netlify.app/functions/compare/lt/</guid><description>{{ lt 1 1 }} → false {{ lt 1 2 }} → true {{ lt 2 1 }} → false {{ lt 1 1 1 }} → false {{ lt 1 1 2 }} → false {{ lt 1 2 1 }} → false {{ lt 1 2 2 }} → true {{ lt 2 1 1 }} → false {{ lt 2 1 2 }} → false {{ lt 2 2 1 }} → false</description></item><item><title>compare.Ne</title><link>https://v0-122-0--gohugoio.netlify.app/functions/compare/ne/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://v0-122-0--gohugoio.netlify.app/functions/compare/ne/</guid><description>{{ ne 1 1 }} → false {{ ne 1 2 }} → true {{ ne 1 1 1 }} → false {{ ne 1 1 2 }} → false {{ ne 1 2 1 }} → false {{ ne 1 2 2 }} → true</description></item></channel></rss>