mirror of
https://github.com/EnumeratedDev/stormfetch.git
synced 2026-09-15 23:46:12 +00:00
Do not attempt to show memory if not found
This commit is contained in:
@@ -256,6 +256,10 @@ func initializeModuleMap() {
|
||||
memoryModule := StormfetchModule{stormfetchModuleConfig: stormfetchModuleConfig{Name: "memory", Format: "%3Memory: %4$MEM_USED MiB / $MEM_TOTAL MiB"}, Execute: func(sm StormfetchModule) string {
|
||||
memoryInfo := GetMemoryInfo()
|
||||
|
||||
if memoryInfo == nil {
|
||||
return ""
|
||||
}
|
||||
|
||||
return os.Expand(sm.Format, func(s string) string {
|
||||
switch s {
|
||||
case "MEM_TOTAL":
|
||||
|
||||
Reference in New Issue
Block a user