(s, comm string)
| 25 | ) |
| 26 | |
| 27 | func hash(s, comm string) string { |
| 28 | var res []string |
| 29 | for _, l := range strings.Split(s, "\n") { |
| 30 | trimmed := strings.TrimSpace(l) |
| 31 | if trimmed == "" || strings.HasPrefix(trimmed, comm) { |
| 32 | continue |
| 33 | } |
| 34 | res = append(res, trimmed) |
| 35 | } |
| 36 | return strings.Join(res, "\n") |
| 37 | } |
| 38 | |
| 39 | func testDeviceFilter(t testing.TB, devices []specs.LinuxDeviceCgroup, expectedStr string) { |
| 40 | insts, _, err := DeviceFilter(devices) |
no outgoing calls
no test coverage detected
searching dependent graphs…