added build tags to files

This commit is contained in:
lin committed 2026-10-05 14:48:43 +02:00
1 parent 71e4f1294e
commit ea50417715
4 files changed
+14 -16

No files matched your search

-16
View File
@@ -1,10 +1,5 @@
package system_check
import (
"fmt"
"runtime"
)
type MemoryInformation struct {
/*
* The total amount of memory the system has available
@@ -19,14 +14,3 @@ type MemoryInformation struct {
func (memInfo MemoryInformation) GetUsedMemory() uint64 {
return memInfo.SystemMemory - memInfo.AvailableMemory
}
func GetRamInformation() (MemoryInformation, error) {
switch runtime.GOOS {
case "windows":
return getWinRamInfo(getWindowsTools().ProcGlobalMemoryStatusEx), nil
case "linux":
return getLinuxRamInfo()
default:
return MemoryInformation{}, fmt.Errorf("Unsupported OS: \"%s\"", runtime.GOOS)
}
}