utils

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Feb 26, 2020 License: Apache-2.0 Imports: 2 Imported by: 45

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Clone

func Clone(val interface{}) interface{}

Clone performs a deep clone of a JSON-ish structure.

func Merge

func Merge(src, changes interface{}) interface{}

Merge merges changes into src recursively. The original objects will be left unchanged.

func MergeJSON

func MergeJSON(src, changes []byte) ([]byte, error)

MergeJSON does the same as Merge, except it accepts and returns byte arrays that

func Remarshal

func Remarshal(src, target interface{}) error

Remarshal marshals src and then unmarshals it into target.

Types

This section is empty.

Jump to

Keyboard shortcuts

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