1
0
mirror of https://github.com/shirou/gopsutil.git synced 2025-04-29 13:49:21 +08:00
shirou_gopsutil/mem/mem_fallback.go
Lukas Fittl da9fa1162b Add fallback code for all unsupported operating systems.
This enables using gopsutil in a codebase that gets built on other OSes
than the ones supported. Instead of a build failure as before, due to
the build tags, gopsutil will now throw an "not implemented" runtime
error.

Fixes #234.
2016-08-22 15:31:26 -07:00

14 lines
297 B
Go

// +build !darwin,!linux,!freebsd,!windows
package mem
import "github.com/shirou/gopsutil/internal/common"
func VirtualMemory() (*VirtualMemoryStat, error) {
return nil, common.ErrNotImplementedError
}
func SwapMemory() (*SwapMemoryStat, error) {
return nil, common.ErrNotImplementedError
}