code refactor

This commit is contained in:
MaysWind
2023-09-17 18:07:09 +08:00
parent 4cecc78a74
commit 0b678fe69a
26 changed files with 101 additions and 101 deletions
+2 -2
View File
@@ -8,7 +8,7 @@ import (
)
// Clone deep-clones src object to dst object
func Clone(src, dst interface{}) error {
func Clone(src, dst any) error {
var buf bytes.Buffer
if err := gob.NewEncoder(&buf).Encode(src); err != nil {
@@ -25,7 +25,7 @@ func Clone(src, dst interface{}) error {
}
// PrintObjectFields prints all fields in specified object
func PrintObjectFields(obj interface{}) {
func PrintObjectFields(obj any) {
if obj == nil {
return
}