Skip to content

Commit

Permalink
sysinfo: allow Name and Version fields to be empty
Browse files Browse the repository at this point in the history
  • Loading branch information
apprehensions committed Nov 1, 2023
1 parent 296a2fb commit 66c0354
Showing 1 changed file with 0 additions and 9 deletions.
9 changes: 0 additions & 9 deletions sysinfo/distro.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -51,9 +46,5 @@ func (d distro) String() string {
d.Name = "Linux"
}

if d.Version == "" {
d.Version = "Linux"
}

return d.Name + " " + d.Version
}

0 comments on commit 66c0354

Please sign in to comment.