mirror of
https://github.com/yannh/kubeconform.git
synced 2026-04-07 14:26:54 +00:00
Update Golang to 1.21.4 (#245)
This commit is contained in:
parent
6ae8c45bc1
commit
d8f00a3a30
32 changed files with 452 additions and 134 deletions
6
pkg/cache/ondisk.go
vendored
6
pkg/cache/ondisk.go
vendored
|
|
@ -4,7 +4,7 @@ import (
|
|||
"crypto/sha256"
|
||||
"encoding/hex"
|
||||
"fmt"
|
||||
"io/ioutil"
|
||||
"io"
|
||||
"os"
|
||||
"path"
|
||||
"sync"
|
||||
|
|
@ -37,12 +37,12 @@ func (c *onDisk) Get(resourceKind, resourceAPIVersion, k8sVersion string) (inter
|
|||
return nil, err
|
||||
}
|
||||
|
||||
return ioutil.ReadAll(f)
|
||||
return io.ReadAll(f)
|
||||
}
|
||||
|
||||
// Set adds a JSON schema to the schema cache
|
||||
func (c *onDisk) Set(resourceKind, resourceAPIVersion, k8sVersion string, schema interface{}) error {
|
||||
c.Lock()
|
||||
defer c.Unlock()
|
||||
return ioutil.WriteFile(cachePath(c.folder, resourceKind, resourceAPIVersion, k8sVersion), schema.([]byte), 0644)
|
||||
return os.WriteFile(cachePath(c.folder, resourceKind, resourceAPIVersion, k8sVersion), schema.([]byte), 0644)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue