[Agent] [Status] add host info to agent status

This commit is contained in:
zeaslity
2024-01-18 15:32:50 +08:00
parent ed2769062e
commit d1671bbe77
2 changed files with 18 additions and 12 deletions

View File

@@ -1,25 +1,16 @@
package status
import (
"fmt"
"agent-go/utils"
"testing"
)
func TestGetHostInfo(t *testing.T) {
hostInfo := HostInfo{}
fmt.Printf("host info is %v\n", hostInfo)
fmt.Printf("host info type is %T\n", hostInfo)
fmt.Printf("host info address is %p\n", &hostInfo)
fmt.Println()
info, err := GetHostInfo()
if err != nil {
t.Errorf("get host info error is %v", err)
}
fmt.Printf("get host info is %v\n", info)
fmt.Printf("get host info address is %p\n", &info)
utils.BeautifulPrint(info)
}