types

package
v0.38.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 5, 2018 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Overview

Package types contains types shared between packages in Hugo.

Package types contains types shared between packages in Hugo.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type EvictingStringQueue added in v0.30.1

type EvictingStringQueue struct {
	// contains filtered or unexported fields
}

EvictingStringQueue is a queue which automatically evicts elements from the head of the queue when attempting to add new elements onto the queue and it is full. This queue orders elements LIFO (last-in-first-out). It throws away duplicates. Note: This queue currently does not contain any remove (poll etc.) methods.

func NewEvictingStringQueue added in v0.30.1

func NewEvictingStringQueue(size int) *EvictingStringQueue

NewEvictingStringQueue creates a new queue with the given size.

func (*EvictingStringQueue) Add added in v0.30.1

func (q *EvictingStringQueue) Add(v string)

Add adds a new string to the tail of the queue if it's not already there.

func (*EvictingStringQueue) Peek added in v0.30.1

func (q *EvictingStringQueue) Peek() string

Peek looks at the last element added to the queue.

func (*EvictingStringQueue) PeekAll added in v0.30.1

func (q *EvictingStringQueue) PeekAll() []string

PeekAll looks at all the elements in the queue, with the newest first.

func (*EvictingStringQueue) PeekAllSet added in v0.30.1

func (q *EvictingStringQueue) PeekAllSet() map[string]bool

PeekAllSet returns PeekAll as a set.

type KeyValueStr added in v0.38.1

type KeyValueStr struct {
	Key   string
	Value string
}

KeyValueStr is a string tuple.

type KeyValues

type KeyValues struct {
	Key    interface{}
	Values []interface{}
}

KeyValues holds an key and a slice of values.

func NewKeyValuesStrings

func NewKeyValuesStrings(key string, values ...string) KeyValues

func (KeyValues) KeyString

func (k KeyValues) KeyString() string

KeyString returns the key as a string, an empty string if conversion fails.

func (KeyValues) String

func (k KeyValues) String() string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL