22 lines
321 B
Go
22 lines
321 B
Go
package status
|
|
|
|
import (
|
|
"encoding/json"
|
|
"fmt"
|
|
"testing"
|
|
)
|
|
|
|
func TestGetDiskStatus(t *testing.T) {
|
|
|
|
ds := GetDiskStatus()
|
|
fmt.Printf("Total: %v, Used: %v\n", ds.Total, ds.Used)
|
|
|
|
marshalIndent, err := json.MarshalIndent(ds, "", " ")
|
|
if err != nil {
|
|
fmt.Printf("error")
|
|
}
|
|
|
|
fmt.Println(string(marshalIndent))
|
|
|
|
}
|