From ccf7a6822f217c84f4feb9d860cb6c9ffeb7688b Mon Sep 17 00:00:00 2001 From: "Sean E. Russell" Date: Mon, 22 Jun 2020 10:23:10 -0500 Subject: [PATCH] Fix build errors on FreeBSD --- widgets/proc_freebsd.go | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/widgets/proc_freebsd.go b/widgets/proc_freebsd.go index a9386362..1df0c66e 100644 --- a/widgets/proc_freebsd.go +++ b/widgets/proc_freebsd.go @@ -42,15 +42,18 @@ func getProcs() ([]Proc, error) { } pid, err := strconv.Atoi(strings.TrimSpace(process.Pid)) if err != nil { - log.Printf(tr.Value("widget.proc.err.pidconv", err.Error(), process)) + sp := fmt.Sprintf("%v", process) + log.Printf(tr.Value("widget.proc.err.pidconv", err.Error(), sp)) } cpu, err := strconv.ParseFloat(utils.ConvertLocalizedString(process.CPU), 32) if err != nil { - log.Printf(tr.Value("widget.proc.err.cpuconv", err.Error(), process)) + sp := fmt.Sprintf("%v", process) + log.Printf(tr.Value("widget.proc.err.cpuconv", err.Error(), sp)) } mem, err := strconv.ParseFloat(utils.ConvertLocalizedString(process.Mem), 32) if err != nil { - log.Printf(tr.Value("widget.proc.err.memconv", err.Error(), process)) + sp := fmt.Sprintf("%v", process) + log.Printf(tr.Value("widget.proc.err.memconv", err.Error(), sp)) } proc := Proc{ Pid: pid,