merge

package
v2.20.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 22, 2024 License: Apache-2.0 Imports: 5 Imported by: 2

Documentation

Index

Constants

View Source
const (
	TAG_PARENT = "parent"
	TAG_CHILD  = "child"
	TAG_RESULT = "result"
)

Variables

This section is empty.

Functions

func MergeStruct deprecated

func MergeStruct(parent, child reflect.Value) reflect.Value

Deprecated: Use MergeStructTranscribe() instead.

Types

type Mapping added in v2.8.0

type Mapping struct {
	From path.ContextPath
	To   path.ContextPath
}

The path to one output field, and its corresponding input. From.Tag will be TAG_PARENT or TAG_CHILD depending on the origin of the field.

func (Mapping) String added in v2.8.0

func (m Mapping) String() string

type Transcript added in v2.8.0

type Transcript struct {
	Mappings []Mapping
}

func MergeStructTranscribe added in v2.8.0

func MergeStructTranscribe(parent, child interface{}) (interface{}, Transcript)

MergeStructTranscribe is intended for use by config/vX_Y/ packages and by generic external translation code. Most users should use the properly typed wrappers provided by the config/vX_Y/ packages.

MergeStructTranscribe merges the specified configs and returns a transcript of the actions taken. parent and child MUST be the same type.

func (Transcript) String added in v2.8.0

func (t Transcript) String() string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL