convert c.item to a string
(c *Cache)
| 27 | |
| 28 | // convert c.item to a string |
| 29 | func itemAsString(c *Cache) []string { |
| 30 | c.mu.Lock() |
| 31 | defer c.mu.Unlock() |
| 32 | var out []string |
| 33 | for name, item := range c.item { |
| 34 | out = append(out, fmt.Sprintf("name=%q opens=%d size=%d", filepath.ToSlash(name), item.opens, item.info.Size)) |
| 35 | } |
| 36 | sort.Strings(out) |
| 37 | return out |
| 38 | } |
| 39 | |
| 40 | // convert c.item to a string |
| 41 | func itemSpaceAsString(c *Cache) []string { |
no test coverage detected
searching dependent graphs…