diff --git a/pkg/memory/memory.go b/pkg/memory/memory.go index e2b582b..9c138ed 100644 --- a/pkg/memory/memory.go +++ b/pkg/memory/memory.go @@ -3,6 +3,7 @@ package memory import ( "fmt" "os" + "strconv" "strings" ) @@ -21,6 +22,9 @@ func GetMemoryInfo() MemoryInfo { return memoryInfo } + //Declare Variables for Calculation + var totalMem, availableMem int64 + // Parse the contents to get total, used, and free memory lines := strings.Split(string(memInfo), "\n") for _, line := range lines {