[Agent] [Status] network info accomplish
This commit is contained in:
22
agent-go/utils/PrintUtils.go
Normal file
22
agent-go/utils/PrintUtils.go
Normal 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()
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user