From 66c0354500babafceaf26a32bc24bb32b1c1fce5 Mon Sep 17 00:00:00 2001 From: sewn Date: Wed, 1 Nov 2023 11:42:09 +0300 Subject: [PATCH] sysinfo: allow Name and Version fields to be empty --- sysinfo/distro.go | 9 --------- 1 file changed, 9 deletions(-) diff --git a/sysinfo/distro.go b/sysinfo/distro.go index 46e036c5..2a29f593 100644 --- a/sysinfo/distro.go +++ b/sysinfo/distro.go @@ -14,11 +14,6 @@ type distro struct { } func getDistro() (d distro) { - d = distro{ - Name: "unknown distro name", - Version: "unknown distro version", - } - f, err := os.Open("/etc/os-release") if err != nil { return @@ -51,9 +46,5 @@ func (d distro) String() string { d.Name = "Linux" } - if d.Version == "" { - d.Version = "Linux" - } - return d.Name + " " + d.Version }