ref: 14c50ed0b3050906015c48c987460865bfd7f30c
parent: 186ec93c43fb4be482679dce0728aa70621a1c32
author: Alex Musolino <[email protected]>
date: Fri Dec 8 05:36:40 EST 2023
imgsrv.go: clean up empty bins after deleting tags
--- a/imgsrv.go
+++ b/imgsrv.go
@@ -398,6 +398,9 @@
func (lut StrLUT) Del(k, v string) {
if bin, ok := lut[k]; ok {
delete(bin, v)
+ if len(bin) == 0 {
+ delete(lut, k)
+ }
}
}