From 3487bbfaed43d53faf8d80c0fce488f113820660 Mon Sep 17 00:00:00 2001 From: "Sean E. Russell" Date: Tue, 28 Apr 2020 13:23:50 -0500 Subject: Fix lint refactoring failures for cross-compile files --- widgets/proc_freebsd.go | 6 +++--- widgets/proc_other.go | 2 +- widgets/proc_windows.go | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/widgets/proc_freebsd.go b/widgets/proc_freebsd.go index ed7a935..34fee18 100644 --- a/widgets/proc_freebsd.go +++ b/widgets/proc_freebsd.go @@ -16,7 +16,7 @@ type processList struct { Process []struct { Pid string `json:"pid"` Comm string `json:"command"` - Cpu string `json:"percent-cpu" ` + CPU string `json:"percent-cpu" ` Mem string `json:"percent-memory" ` Args string `json:"arguments" ` } `json:"process"` @@ -44,7 +44,7 @@ func getProcs() ([]Proc, error) { if err != nil { log.Printf("failed to convert first field to int: %v. split: %v", err, process) } - cpu, err := strconv.ParseFloat(utils.ConvertLocalizedString(process.Cpu), 32) + cpu, err := strconv.ParseFloat(utils.ConvertLocalizedString(process.CPU), 32) if err != nil { log.Printf("failed to convert third field to float: %v. split: %v", err, process) } @@ -55,7 +55,7 @@ func getProcs() ([]Proc, error) { proc := Proc{ Pid: pid, CommandName: process.Comm, - Cpu: cpu, + CPU: cpu, Mem: mem, FullCommand: process.Args, } diff --git a/widgets/proc_other.go b/widgets/proc_other.go index 46cef72..b761431 100644 --- a/widgets/proc_other.go +++ b/widgets/proc_other.go @@ -46,7 +46,7 @@ func getProcs() ([]Proc, error) { proc := Proc{ Pid: pid, CommandName: strings.TrimSpace(line[11:61]), - Cpu: cpu, + CPU: cpu, Mem: mem, FullCommand: line[74:], } diff --git a/widgets/proc_windows.go b/widgets/proc_windows.go index adc49e9..56590c7 100644 --- a/widgets/proc_windows.go +++ b/widgets/proc_windows.go @@ -32,7 +32,7 @@ func getProcs() ([]Proc, error) { procs[i] = Proc{ Pid: int(pid), CommandName: command, - Cpu: cpu, + CPU: cpu, Mem: float64(mem), // getting command args using gopsutil's Cmdline and CmdlineSlice wasn't // working the last time I tried it, so we're just reusing 'command' -- cgit v1.2.3