Documentation ¶
Index ¶
Constants ¶
View Source
const ( // TagName is the deepcopier struct tag name. TagName = "deepcopier" // FieldOptionName is the from field option name for struct tag. FieldOptionName = "field" // ContextOptionName is the context option name for struct tag. ContextOptionName = "context" // SkipOptionName is the skip option name for struct tag. SkipOptionName = "skip" // ForceOptionName is the skip option name for struct tag. ForceOptionName = "force" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DeepCopier ¶
type DeepCopier struct {
// contains filtered or unexported fields
}
DeepCopier deep copies a struct to/from a struct.
func (*DeepCopier) From ¶
func (dc *DeepCopier) From(src interface{}) error
From sets the given the source as destination and destination as source.
func (*DeepCopier) WithContext ¶
func (dc *DeepCopier) WithContext(ctx map[string]interface{}) *DeepCopier
WithContext injects the given context into the builder instance.
type Options ¶
type Options struct { // Context given to WithContext() method. Context map[string]interface{} // Reversed reverses struct tag checkings. Reversed bool }
Options are copier options.
type TagOptions ¶
TagOptions is a map that contains extracted struct tag options.
Click to show internal directories.
Click to hide internal directories.