Get memory usage information in Go. This library obtains and parses memory data from /proc/meminfo.
Currently Linux only.
In your project directory, type
go get github.com/alexcoder04/memeAnd then, in your code
memData, err:=meme.GetMemInfo()The result comes in following type:
typeMemDatastruct {
Buffersfloat64Cachedfloat64MemAvailablefloat64MemFreefloat64MemTotalfloat64Sharedfloat64Usedfloat64SwapFreefloat64SwapTotalfloat64SwapUsedfloat64
}