github.com/keybase/client/go@v0.0.0-20241007131713-f10651d043c8/libkb/osv_nix.go (about) 1 //go:build dragonfly || freebsd || linux || netbsd || openbsd || solaris 2 // +build dragonfly freebsd linux netbsd openbsd solaris 3 4 package libkb 5 6 // OSVersionAndBuild returns OS version, and build too on some platforms 7 func OSVersionAndBuild() (string, string, error) { 8 productVersion, err := execToString("uname", []string{"-mrs"}) 9 if err != nil { 10 return "", "", err 11 } 12 13 buildVersion, err := execToString("lsb_release", []string{"-sd"}) 14 if err != nil { 15 return productVersion, "", err 16 } 17 return productVersion, buildVersion, nil 18 }