fix: appease linter on darwin (#11154)

Fixing up some linting errors that show up on Darwin, but not in CI.
This commit is contained in:
Spike Curtis
2023-12-12 17:02:28 +04:00
committed by GitHub
parent 2883cad6ad
commit edeb9bb42a
8 changed files with 20 additions and 11 deletions
+4 -4
View File
@@ -7,18 +7,18 @@ import (
"github.com/spf13/afero"
)
func (p *Process) Niceness(sc Syscaller) (int, error) {
func (*Process) Niceness(Syscaller) (int, error) {
return 0, errUnimplemented
}
func (p *Process) SetNiceness(sc Syscaller, score int) error {
func (*Process) SetNiceness(Syscaller, int) error {
return errUnimplemented
}
func (p *Process) Cmd() string {
func (*Process) Cmd() string {
return ""
}
func List(fs afero.Fs, syscaller Syscaller) ([]*Process, error) {
func List(afero.Fs, Syscaller) ([]*Process, error) {
return nil, errUnimplemented
}
+1
View File
@@ -10,6 +10,7 @@ type Syscaller interface {
Kill(pid int32, sig syscall.Signal) error
}
// nolint: unused // used on some but no all platforms
const defaultProcDir = "/proc"
type Process struct {
+3 -3
View File
@@ -17,14 +17,14 @@ var errUnimplemented = xerrors.New("unimplemented")
type nopSyscaller struct{}
func (nopSyscaller) SetPriority(pid int32, priority int) error {
func (nopSyscaller) SetPriority(int32, int) error {
return errUnimplemented
}
func (nopSyscaller) GetPriority(pid int32) (int, error) {
func (nopSyscaller) GetPriority(int32) (int, error) {
return 0, errUnimplemented
}
func (nopSyscaller) Kill(pid int32, sig syscall.Signal) error {
func (nopSyscaller) Kill(int32, syscall.Signal) error {
return errUnimplemented
}