This commit is contained in:
insanity
2017-10-23 15:59:38 +09:00
parent 1552f4eaba
commit 2ee7fa5853
3 changed files with 110 additions and 85 deletions

View File

@@ -6,15 +6,15 @@ import (
"bufio"
)
type MEMStat struct {
type MemStat struct {
}
func (cpu MEMStat) Command() string {
func (mem MemStat) Command() string {
return "cat /proc/meminfo"
}
func (cpu MEMStat) Parse(r io.Reader) (map[string]string, error) {
func (mem MemStat) Parse(r io.Reader) (map[string]string, error) {
var (
memInfo = map[string]string{}
scanner = bufio.NewScanner(r)