Help us shape the future of Go! Take the 2026 Go Developer Survey

deepcopy

package module
v0.0.0-...-88c31e5 Latest Latest
Warning

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

Go to latest
Published: Jun 1, 2020 License: MIT Imports: 1 Imported by: 0

README

deepcopy

library to make deep copies in go

   newValue := deepcopy.Do(value)

It manages when struct have pointers to parents/children. e.g:

   type MyStruct struct {
        Parent *MyStruct
        Children []*MyStruct
   }

Unexported fields are not copied.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Copy

func Copy(i interface{}) interface{}

Copy takes any objects and create a deep copy of it, and all its fields or elements. In case of reflect.Invalid, reflect.Chan and reflect.UnsafePointer types, it returns nil.

Types

This section is empty.

Jump to

Keyboard shortcuts

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