deleteRecursive will delete an entry recursively, but not change its parent.
(h dataUsageHash)
| 482 | |
| 483 | // deleteRecursive will delete an entry recursively, but not change its parent. |
| 484 | func (d *dataUsageCache) deleteRecursive(h dataUsageHash) { |
| 485 | if existing, ok := d.Cache[h.String()]; ok { |
| 486 | // Delete first if there should be a loop. |
| 487 | delete(d.Cache, h.Key()) |
| 488 | for child := range existing.Children { |
| 489 | d.deleteRecursive(dataUsageHash(child)) |
| 490 | } |
| 491 | } |
| 492 | } |
| 493 | |
| 494 | // dui converts the flattened version of the path to madmin.DataUsageInfo. |
| 495 | // As a side effect d will be flattened, use a clone if this is not ok. |
no test coverage detected