https://github.com/rocket049/gostructcopy
copy the exported value of a struct to a likely struct , with reflect.
https://github.com/rocket049/gostructcopy
Last synced: 6 months ago
JSON representation
copy the exported value of a struct to a likely struct , with reflect.
- Host: GitHub
- URL: https://github.com/rocket049/gostructcopy
- Owner: rocket049
- License: apache-2.0
- Created: 2019-05-11T08:09:45.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2019-05-11T08:22:09.000Z (about 7 years ago)
- Last Synced: 2024-06-19T04:23:50.015Z (about 2 years ago)
- Language: Go
- Size: 5.86 KB
- Stars: 9
- Watchers: 1
- Forks: 6
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# gostructcopy
func:
```
//CopyToStruct copy the exported value of a struct to a likely struct , with reflect.利用 reflect 技术把结构体的可 export 值复制到 dst 中
func StructCopy(src, dst interface{}) error
```
copy the exported value of a struct to a likely struct , with reflect. dst must be pointer to s likely struct.
利用 reflect 技术把结构体的可 export 值复制到 dst 中,dst 必须是相似结构体的指针。