[agent-go] [status] add status module
This commit is contained in:
22
agent-go/status/Network_test.go
Normal file
22
agent-go/status/Network_test.go
Normal file
@@ -0,0 +1,22 @@
|
||||
package status
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
"testing"
|
||||
)
|
||||
|
||||
func TestGetNetworkInfo(t *testing.T) {
|
||||
|
||||
networkInfo, err := GetNetworkInfo()
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
|
||||
marshalIndent, err := json.MarshalIndent(networkInfo, "", " ")
|
||||
if err != nil {
|
||||
fmt.Printf("error")
|
||||
}
|
||||
|
||||
fmt.Println(string(marshalIndent))
|
||||
}
|
||||
Reference in New Issue
Block a user