mirror of
https://github.com/mayswind/ezbookkeeping.git
synced 2026-05-14 06:57:35 +08:00
code refactor
This commit is contained in:
+2
-2
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user