small pixel drawing of a pufferfish zoa

trim newlines from uname
Jes Olson j3s@c3f.net
Sat, 01 Oct 2022 15:42:43 -0500
commit

99383f87e047dceb353e6c07a773fd279b1d158a

parent

aef27f961e323ddd78bcb15399c01c238ea83f1b

1 files changed, 4 insertions(+), 4 deletions(-)

jump to
M env/env.goenv/env.go

@@ -98,25 +98,25 @@ out, err := exec.Command("uname", "-m").Output()

if err != nil { return uname, err } - uname.Arch = string(out) + uname.Arch = strings.TrimSuffix(string(out), "\n") out, err = exec.Command("uname", "-n").Output() if err != nil { return uname, err } - uname.Nodename = string(out) + uname.Nodename = strings.TrimSuffix(string(out), "\n") out, err = exec.Command("uname", "-r").Output() if err != nil { return uname, err } - uname.Release = string(out) + uname.Release = strings.TrimSuffix(string(out), "\n") out, err = exec.Command("uname", "-s").Output() if err != nil { return uname, err } - uname.Sysname = string(out) + uname.Sysname = strings.TrimSuffix(string(out), "\n") return uname, nil }