Fix ui, hide report date

This commit is contained in:
Audrius Butkevicius
2020-06-20 17:46:44 +01:00
parent 3fcf22ed5d
commit 16f2445764
22 changed files with 826 additions and 648 deletions
+5 -6
View File
@@ -7,25 +7,24 @@
package ur
import (
"errors"
"os/exec"
"strconv"
"strings"
)
func memorySize() (int64, error) {
func memorySize() int64 {
cmd := exec.Command("/sbin/sysctl", "hw.physmem64")
out, err := cmd.Output()
if err != nil {
return 0, err
return 0
}
fs := strings.Fields(string(out))
if len(fs) != 3 {
return 0, errors.New("sysctl parse error")
return 0
}
bytes, err := strconv.ParseInt(fs[2], 10, 64)
if err != nil {
return 0, err
return 0
}
return bytes, nil
return bytes
}