package deepcopy
import "github.com/mohae/deepcopy"
deepcopy makes deep copies of things. A standard copy will copy the pointers: deep copy copies the values pointed to. Unexported field values are not copied.
Copyright (c)2014-2016, Joel Scoble (github.com/mohae), all rights reserved. License: MIT, for more details check the included LICENSE file.
Index ¶
Functions ¶
func Copy ¶
func Copy(src interface{}) interface{}
Copy creates a deep copy of whatever is passed to it and returns the copy in an interface{}. The returned value will need to be asserted to the correct type.
func Iface ¶
func Iface(iface interface{}) interface{}
Iface is an alias to Copy; this exists for backwards compatibility reasons.
Types ¶
type Interface ¶
type Interface interface {
DeepCopy() interface{}
}
Interface for delegating copy process to type
Source Files ¶
- Version
- v0.0.0-20170929034955-c48cc78d4826 (latest)
- Published
- Sep 29, 2017
- Platform
- windows/amd64
- Imports
- 2 packages
- Last checked
- 4 weeks ago –
Tools for package owners.