diff --git a/disk/disk_windows.go b/disk/disk_windows.go index b7f0c515e..6aa47a702 100644 --- a/disk/disk_windows.go +++ b/disk/disk_windows.go @@ -15,6 +15,8 @@ import ( "golang.org/x/sys/windows/registry" ) +type Warnings = common.Warnings + var ( procGetDiskFreeSpaceExW = common.Modkernel32.NewProc("GetDiskFreeSpaceExW") procGetLogicalDriveStringsW = common.Modkernel32.NewProc("GetLogicalDriveStringsW") @@ -80,7 +82,7 @@ func UsageWithContext(ctx context.Context, path string) (*UsageStat, error) { } func PartitionsWithContext(ctx context.Context, all bool) ([]PartitionStat, error) { - warnings := common.Warnings{ + warnings := Warnings{ Verbose: true, } var ret []PartitionStat diff --git a/host/host_linux.go b/host/host_linux.go index a6bb3fca2..949babac4 100644 --- a/host/host_linux.go +++ b/host/host_linux.go @@ -19,6 +19,8 @@ import ( "golang.org/x/sys/unix" ) +type Warnings = common.Warnings + type lsbStruct struct { ID string Release string @@ -395,7 +397,7 @@ func SensorsTemperaturesWithContext(ctx context.Context) ([]TemperatureStat, err } } - var warns common.Warnings + var warns Warnings if len(files) == 0 { // handle distributions without hwmon, like raspbian #391, parse legacy thermal_zone files files, err = filepath.Glob(common.HostSys("/class/thermal/thermal_zone*/"))