# Functions
Backoff returns a delay with an exponential backoff based on the number of retries.
BFS performs a breadth first traversal calling f for each node starting from u.
Allocation free conversion from []byte to string (unsafe) Note that the byte slice must not be modified after conversion.
Close reads the remaining bytes from the response and then closes it to ensure that the connection is freed.
Compare returns 0 if a equals b, -1 if a is less than b, and 1 if b is than a.
DefaultBackoff returns a delay with an exponential backoff based on the number of retries.
DFS performs a depth first traversal calling f for each node starting from u.
DFSPath returns a path from node a to node z found by performing a depth first traversal.
GrowPtrSlice appends n elements to the slice, each pointing to a newly-allocated T.
Keys returns a slice of keys from any map.
KeysSorted returns a slice of keys from any map, sorted in ascending order.
MustMarshalJSON returns the JSON encoding of x
If the data cannot be encoded, this function will panic.
MustUnmarshalJSON parse the JSON encoded data and returns the result.
NewEnumFlag returns a new EnumFlag that has a defaultValue and vs enumerated values.
NewFIFO returns a new FIFO queue containing elements ts starting with the left-most argument at the front.
NewHasherMap returns a new empty HasherMap.
NewHashMap returns a new empty HashMap.
NewJSONDecoder returns a new decoder that reads from r.
NewLIFO returns a new LIFO queue containing elements ts starting with the left-most argument at the bottom.
NewPtrSlice returns a slice of pointers to T with length n, with only 2 allocations performed no matter the size of n.
NewTypedHashMap returns a new empty TypedHashMap.
NumDigitsInt returns the number of digits in n.
NumDigitsUint returns the number of digits in n.
Note(philipc): Originally taken from server/server.go The DecodingLimitHandler handles validating that the gzip payload is within the allowed max size limit.
Reference returns a pointer to its argument unless the argument already is a pointer.
RoundTrip encodes to JSON, and decodes the result again.
Allocation free conversion from ~string to []byte (unsafe) Note that the byte slice must not be modified after conversion.
TimerWithCancel exists because of memory leaks when using time.After in select statements.
Unmarshal decodes a YAML, JSON or JSON extension value into the specified type.
UnmarshalJSON parses the JSON encoded data and stores the result in the value pointed to by x.
Values returns a slice of values from any map.
WaitFunc will call passed function at an interval and return nil as soon this function returns true.
# Structs
EnumFlag implements the pflag.Value interface to provide enumerated command line parameter values.
FIFO represents a simple FIFO queue.
HasherMap represents a simpler version of TypedHashMap that uses Hasher's for keys, and requires only an equality function for keys.
LIFO represents a simple LIFO queue.
TypedHashMap represents a key/value map.