Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: moves common.Warnings to common OS files #1431

Merged
merged 1 commit into from
Mar 19, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 2 additions & 0 deletions disk/disk.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"`
Expand Down
2 changes: 0 additions & 2 deletions disk/disk_windows.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@ import (
"golang.org/x/sys/windows/registry"
)

type Warnings = common.Warnings

var (
procGetDiskFreeSpaceExW = common.Modkernel32.NewProc("GetDiskFreeSpaceExW")
procGetLogicalDriveStringsW = common.Modkernel32.NewProc("GetLogicalDriveStringsW")
Expand Down
2 changes: 2 additions & 0 deletions host/host.go
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 0 additions & 2 deletions host/host_linux.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,6 @@ import (
"golang.org/x/sys/unix"
)

type Warnings = common.Warnings

type lsbStruct struct {
ID string
Release string
Expand Down