package compare

import "github.com/gohugoio/hugo/compare"

Index

Types

type Comparer

type Comparer interface {
	Compare(other interface{}) int
}

Comparer can be used to compare two values. This will be used when using the le, ge etc. operators in the templates. Compare returns -1 if the given version is less than, 0 if equal and 1 if greater than the running version.

type Eqer

type Eqer interface {
	Eq(other interface{}) bool
}

Eqer can be used to determine if this value is equal to the other. The semantics of equals is that the two value are interchangeable in the Hugo templates.

Source Files

compare.go

Version
v0.42.1
Published
Jun 13, 2018
Platform
darwin/amd64
Last checked
3 minutes ago

Tools for package owners.