summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSean E. Russell <ser@ser1.net>2020-04-28 13:23:50 -0500
committerSean E. Russell <ser@ser1.net>2020-04-28 13:23:50 -0500
commit3487bbfaed43d53faf8d80c0fce488f113820660 (patch)
treea0ab9ae7d8c948ea6a0b6053eb03843c4b98875c
parent07f1fe5fe86f27da23cbbaaeadd754cfedf834ee (diff)
Fix lint refactoring failures for cross-compile files
-rw-r--r--widgets/proc_freebsd.go6
-rw-r--r--widgets/proc_other.go2
-rw-r--r--widgets/proc_windows.go2
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'