gte
Reports whether the value is greater than or equal to the given number, comparing both as numbers so 5 and 5.0 rank the same.
A non-numeric operand is an error, and nil counts as zero.
InputArgumentsReturns
Sourcefloat64float64boolBasicSource
Reports whether the value is greater than or equal to the operand, so an exact match still holds.
Given
{"score": 70}Template
{{ score | gte:70 }}Result
trueBelowSource
Returns false when the value falls short of the operand.
Given
{"score": 60}Template
{{ score | gte:70 }}Result
falseFloatSource
Compares as numbers, so a fractional value clears a whole operand.
Given
{"rating": 4.5}Template
{{ rating | gte:4 }}Result
true