diff --git a/disk/disk.go b/disk/disk.go index dd4cc1d5f..0d4b25345 100644 --- a/disk/disk.go +++ b/disk/disk.go @@ -9,6 +9,8 @@ import ( var invoke common.Invoker = common.Invoke{} +type Warnings = common.Warnings + type UsageStat struct { Path string `json:"path"` Fstype string `json:"fstype"` diff --git a/disk/disk_windows.go b/disk/disk_windows.go index c32ccdf18..8a1a28d69 100644 --- a/disk/disk_windows.go +++ b/disk/disk_windows.go @@ -16,8 +16,6 @@ import ( "golang.org/x/sys/windows/registry" ) -type Warnings = common.Warnings - var ( procGetDiskFreeSpaceExW = common.Modkernel32.NewProc("GetDiskFreeSpaceExW") procGetLogicalDriveStringsW = common.Modkernel32.NewProc("GetLogicalDriveStringsW") diff --git a/host/host.go b/host/host.go index f363eed83..c7e84e3a5 100644 --- a/host/host.go +++ b/host/host.go @@ -11,6 +11,8 @@ import ( "github.com/shirou/gopsutil/v3/internal/common" ) +type Warnings = common.Warnings + var invoke common.Invoker = common.Invoke{} // A HostInfoStat describes the host status. diff --git a/host/host_linux.go b/host/host_linux.go index 7f96bfaef..2ff0c268e 100644 --- a/host/host_linux.go +++ b/host/host_linux.go @@ -19,8 +19,6 @@ import ( "golang.org/x/sys/unix" ) -type Warnings = common.Warnings - type lsbStruct struct { ID string Release string