Documentation ¶
Overview ¶
Package collections contains common Hugo functionality related to collection handling.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Append ¶
Append appends from to a slice to and returns the resulting slice. If length of from is one and the only element is a slice of same type as to, it will be appended.
func StringSliceToInterfaceSlice ¶
StringSliceToInterfaceSlice converts ss to []interface{}.
Types ¶
type Order ¶
type Order interface { // Ordinal is a zero-based ordinal that represents the order of an object // in a collection. Ordinal() int }
type Slicer ¶
Slicer defines a very generic way to create a typed slice. This is used in collections.Slice template func to get types such as Pages, PageGroups etc. instead of the less useful []interface{}.
type SortedStringSlice ¶
type SortedStringSlice []string
func (SortedStringSlice) Contains ¶
func (ss SortedStringSlice) Contains(s string) bool
Contains returns true if s is in ss.
func (SortedStringSlice) Count ¶
func (ss SortedStringSlice) Count(s string) int
Count returns the number of times s is in ss.
Click to show internal directories.
Click to hide internal directories.