func ParseMap(pid string, entries EntryMap) {
	maps, err := os.Open("/proc/" + pid + "/maps")
	if err != nil {
		log.Print(err)
	}
	defer maps.Close()
	buff := bufio.NewReader(maps)
	line, _, err := buff.ReadLine()
	for err == nil {
		parseRow(line, entries)
		line, _, err = buff.ReadLine()
	}
	if err != nil && err != io.EOF {
		log.Fatal(err)
	}
}
ParseMap gets all of the entries for a specific map
package data
import (
	"bufio"
	"io"
	"io/ioutil"
	"log"
	"os"
	"regexp"
)
var pidMatch *regexp.Regexp
var rowMatch *regexp.Regexp
func init() {
	pidMatch = regexp.MustCompile(`\d+`)
	rowMatch = regexp.MustCompile(`^(\w+)-(\w+)\s+(\S+)\s+(\d+)\s+(\S+)\s+(\d+)\s*(\S+)?$`)
}
func ParseMaps() EntryMap {
	entries := make(EntryMap)
	files, err := ioutil.ReadDir("/proc")
	if err != nil {
		log.Fatal(err)
	}
	for _, file := range files {
		if file.IsDir() && pidMatch.MatchString(file.Name()) {
			ParseMap(file.Name(), entries)
		}
	}
	return entries
}