Skip to content

Commit

Permalink
[disk][host]: change to use type alias.
Browse files Browse the repository at this point in the history
  • Loading branch information
shirou committed Nov 30, 2022
1 parent 4ac7e99 commit 7ef0efc
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 33 deletions.
2 changes: 1 addition & 1 deletion disk/disk_windows.go
Expand Up @@ -80,7 +80,7 @@ func UsageWithContext(ctx context.Context, path string) (*UsageStat, error) {
}

func PartitionsWithContext(ctx context.Context, all bool) ([]PartitionStat, error) {
warnings := Warnings{
warnings := common.Warnings{
Verbose: true,
}
var ret []PartitionStat
Expand Down
2 changes: 1 addition & 1 deletion host/host_linux.go
Expand Up @@ -395,7 +395,7 @@ func SensorsTemperaturesWithContext(ctx context.Context) ([]TemperatureStat, err
}
}

var warns Warnings
var warns common.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*/"))
Expand Down
30 changes: 0 additions & 30 deletions host/warnings.go

This file was deleted.

2 changes: 1 addition & 1 deletion disk/warnings.go → internal/common/warnings.go
@@ -1,4 +1,4 @@
package disk
package common

import "fmt"

Expand Down

0 comments on commit 7ef0efc

Please sign in to comment.