Documentation ¶
Index ¶
Constants ¶
const ( // ErrValueMustBeCons is raised when a complex Unwrap call can't treat its // source as a data.Cons ErrValueMustBeCons = "value must be a cons cell" // ErrConsMustContainFloat is raised when a complex Unwrap call can't treat // its source's components as data.Floats ErrConsMustContainFloat = "components must be float values" )
const ( // ErrInterfaceTypeMismatch is raised when an interface of the receiver in // a data.Object doesn't match the expected wrapped interface ErrInterfaceTypeMismatch = "interface type mismatch" // ErrInterfaceCoercionNotSupported is raised when the value to unwrap // isn't a data.Object ErrInterfaceCoercionNotSupported = "value cannot be coerced into interface" )
const AleTag = "ale"
AleTag identifies the tag used to specify the kwd used when wrapping a struct as an Object
const ErrChannelCoercionNotSupported = "value cannot be coerced into chan"
ErrChannelCoercionNotSupported is raised when a channel Unwrap is called
const ErrCycleDetected = "cycle detected in wrapping"
ErrCycleDetected is raised when wrapping encounters a reference cycle
const ErrMustImplementValue = "must implement value"
ErrMustImplementValue is raised when a value Unwrap call can't treat its source as a data.Value
const ErrUnsupportedType = "unsupported type"
ErrUnsupportedType is raised when wrapping encounters an unsupported type
const ErrValueMustBeBool = "value must be a bool"
ErrValueMustBeBool is raised when a boolean Unwrap call can't treat its source as a data.Bool
const ErrValueMustBeFloat = "value must be a float"
ErrValueMustBeFloat is raised when a float Unwrap call can't treat its source as a data.Integer or data.Float
const ErrValueMustBeInteger = "value must be an integer"
ErrValueMustBeInteger is raised when an integer Unwrap call can't treat its source as a data.Integer
const ErrValueMustBeProcedure = "value must be a procedure"
ErrValueMustBeProcedure is raised when a function Unwrap call can't treat its source as a data.Procedure
const ErrValueMustBeSequence = "value must be a sequence"
ErrValueMustBeSequence is raised when an Array Unwrap call can't treat its source as a data.Sequence
const ErrValueMustBeString = "value must be a string"
ErrValueMustBeString is raised when an string Unwrap call can't treat its source as a data.String
const ReceiverKey = data.Keyword("receiver")
ReceiverKey is the key used to store an interface receiver
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Context ¶
type Context struct {
// contains filtered or unexported fields
}
Context tracks wrapped reflect.Values to detect cycles