fix: close resource

This commit is contained in:
guangwu 2024-05-10 11:15:45 +08:00 committed by GitHub
parent 142517fc45
commit 1cb08e0ab4
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)
}