An open API service indexing awesome lists of open source software.

https://github.com/bygo/deep

Deep copy based on generics
https://github.com/bygo/deep

copy deepcopy generics go

Last synced: 4 months ago
JSON representation

Deep copy based on generics

Awesome Lists containing this project

README

          

# Usage

## Copy

```go
import "github.com/bygo/deep"

var usersCopy = deep.Copy(users)

```

## CopyIgnore

Some structs will not be deconstructed and their fields copied, but the struct will be copied.

```go
import "github.com/bygo/deep"

var usersCopy = deep.CopyIgnore(users, User{}, Article{})
```