merge

package
v0.0.0-...-c54e3d4 Latest Latest
Warning

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

Go to latest
Published: Jul 31, 2019 License: GPL-3.0 Imports: 1 Imported by: 0

Documentation

Overview

Package merge provides a utility for merging structs of different types using reflection Borrowed from https://stackoverflow.com/a/45258790/1562480 written by Pavlo Strokov

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Merge

func Merge(from, to interface{}, bindings ...Bind) error

Types

type Bind

type Bind struct {
	From, To   string
	Translator Translator
}

type Translator

type Translator func(value interface{}) (interface{}, error)

Jump to

Keyboard shortcuts

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