deepcopy

package
v0.0.0-...-be68371 Latest Latest
Warning

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

Go to latest
Published: Apr 13, 2017 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Copy

func Copy(dst, src interface{})

Copy copies src into dst. dst and src must have the same type.

If the type has a copy function defined, it will be used.

Default implementations for builtin types and well known protobuf types may be provided.

If the copy cannot be performed, this function will panic. Make sure to test types that use this function.

Types

type CopierFrom

type CopierFrom interface {
	// Copy takes the fields from src and copies them into the target object.
	//
	// Calling this method with a nil receiver or a nil src may panic.
	CopyFrom(src interface{})
}

CopierFrom can be implemented if an object knows how to copy another into itself.

Jump to

Keyboard shortcuts

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