Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func OnImplements ¶
func OnImplements(t reflect.Type, iface reflect.Type, input reflect.Value, op TransformFunc) (reflect.Value, error)
OnImplements automatically negotiates between pointered and concrete types. `t` is the source type. `iface` is the interface type we're checking. `input` is the seed value that will be operated on if t implements iface in one form or another and returned unmodified if it doesn't implement the interface. `op` is the operation that will be run if `t` implements `iface`. It is passed the input, and a new value in the proper form of `t` and should return a modified value and an error. This function returns the proper form of the modified value or the original unmodified input.
Types ¶
Click to show internal directories.
Click to hide internal directories.