ParseMaps gathers all of the file entries from every process
()
| 50 | |
| 51 | // ParseMaps gathers all of the file entries from every process |
| 52 | func ParseMaps() EntryMap { |
| 53 | entries := make(EntryMap) |
| 54 | files, err := ioutil.ReadDir("/proc") |
| 55 | if err != nil { |
| 56 | log.Fatal(err) |
| 57 | } |
| 58 | for _, file := range files { |
| 59 | if file.IsDir() && pidMatch.MatchString(file.Name()) { |
| 60 | ParseMap(file.Name(), entries) |
| 61 | } |
| 62 | } |
| 63 | return entries |
| 64 | } |
| 65 | |
| 66 | // ParseMap gets all of the entries for a specific map |
| 67 | func ParseMap(pid string, entries EntryMap) { |
no test coverage detected