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
- Host: GitHub
- URL: https://github.com/bygo/deep
- Owner: bygo
- License: mit
- Created: 2024-01-27T06:26:02.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2024-01-28T05:46:37.000Z (over 2 years ago)
- Last Synced: 2025-12-18T09:22:09.880Z (6 months ago)
- Topics: copy, deepcopy, generics, go
- Language: Go
- Homepage:
- Size: 3.91 KB
- Stars: 5
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
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{})
```