package
7.0.1+incompatible
Repository: https://github.com/apache/trafficcontrol.git
Documentation: pkg.go.dev

# Functions

AddErrorCode takes an error and returns an instance satisfying the Error interface.
Extract the tag annotations from a struct into a string array.
NewError constructs an error with a code.
NewErrorContext constructs an error context with list of valid codes.
RandBool returns a random boolean value.
RandFloat64 returns a random float64.
RandInt returns a random int.
RandInt64 returns a random signed 64-bit int.
RandIntn returns a random int in the half-open interval [0,n).
RandomIPv4 returns, as a string, a random IP address.
RandomIPv6 returns, as a string, a random IPv6 address.
RandStr returns, as a string, a random 100 character alphanumeric, including '-' and '_'.
RandStrArray returns, as an array of 100 strings, with 100 character random alphanumeric, including '-' and '_'.
RandUint returns a random unsigned int.
RandUint64 returns a random unsigned 64-bit int.
SortErrors sorts the list of errors lexically.
No description provided by the author

# Constants

when a default message already exists.
when a bad error code is given in creation of new error.
when the fmt string isn't a string.
when the error context is modifed after having created an error.
when creating an error with no error message, default message wasn't found.

# Structs

ErrorContext regulates which error codes can be made and keeps a count of all the errors created through the context.

# Interfaces

Error describes an interface that supports error codes.

# Type aliases

No description provided by the author