fix: close resource (#272)

This commit is contained in:
guoguangwu 2024-06-30 21:15:53 +08:00 committed by GitHub
parent 142517fc45
commit 347cd5e4c9
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

1
pkg/cache/ondisk.go vendored
View file

@ -36,6 +36,7 @@ func (c *onDisk) Get(resourceKind, resourceAPIVersion, k8sVersion string) (inter
if err != nil {
return nil, err
}
defer f.Close()
return io.ReadAll(f)
}