code refactor
This commit is contained in:
+1
-1
@@ -12,7 +12,7 @@ import (
|
||||
)
|
||||
|
||||
// PrintJsonSuccessResult writes success response in json format to current http context
|
||||
func PrintJsonSuccessResult(c *core.Context, result interface{}) {
|
||||
func PrintJsonSuccessResult(c *core.Context, result any) {
|
||||
c.JSON(http.StatusOK, gin.H{
|
||||
"success": true,
|
||||
"result": result,
|
||||
|
||||
+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