From: Sergey Matveev <stargrave@stargrave.org>
Date: Sun, 30 Apr 2023 11:32:50 +0000 (+0300)
Subject: Swap: is not always present
X-Git-Url: http://www.git.stargrave.org/?a=commitdiff_plain;h=754f34798b94a0001f34cf93c593a11bd868799a;p=godwmstat.git

Swap: is not always present
---

diff --git a/main.go b/main.go
index fb51530..e936217 100644
--- a/main.go
+++ b/main.go
@@ -20,7 +20,7 @@ var (
 	Freq  string = "?"
 	Mem   string = "?"
 	ARC   string = "?"
-	Swap  string = "?"
+	Swap  string = ""
 	Flags string = "?"
 	IOs   string = "?"
 	Net   string = "?"
@@ -77,8 +77,6 @@ func top() {
 		case "Swap:":
 			if len(cols) >= 5 && cols[4] == "Used," {
 				Swap = cols[3] + " Swap "
-			} else {
-				Swap = ""
 			}
 		}
 	}