[Agent] [Status] network info accomplish

This commit is contained in:
zeaslity
2023-12-21 09:58:37 +08:00
parent 14516c93fa
commit 4272296809
3 changed files with 114 additions and 30 deletions

View File

@@ -0,0 +1,22 @@
package utils
import (
"agent-go/logger"
"encoding/json"
"fmt"
)
var log = logger.Log
func BeautifulPrint(object interface{}) {
bytes, err := json.MarshalIndent(object, "", " ")
if err != nil {
log.ErrorF("[BeautifulPrint] - json marshal error ! => %v", object)
}
fmt.Println()
fmt.Println(string(bytes))
fmt.Println()
}