Release new helm chart with certgen fixed (#7478)
* Update go version, modules and remove ioutil * Release new helm chart with certgen fixed
This commit is contained in:
parent
fd8687c648
commit
f973f3ffda
40 changed files with 794 additions and 614 deletions
|
|
@ -19,7 +19,7 @@ package file
|
|||
import (
|
||||
"crypto/sha1" // #nosec
|
||||
"encoding/hex"
|
||||
"io/ioutil"
|
||||
"os"
|
||||
|
||||
"k8s.io/klog/v2"
|
||||
)
|
||||
|
|
@ -27,7 +27,7 @@ import (
|
|||
// SHA1 returns the SHA1 of a file.
|
||||
func SHA1(filename string) string {
|
||||
hasher := sha1.New() // #nosec
|
||||
s, err := ioutil.ReadFile(filename)
|
||||
s, err := os.ReadFile(filename)
|
||||
if err != nil {
|
||||
klog.ErrorS(err, "Error reading file", "path", filename)
|
||||
return ""
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@ limitations under the License.
|
|||
package file
|
||||
|
||||
import (
|
||||
"io/ioutil"
|
||||
"os"
|
||||
"testing"
|
||||
)
|
||||
|
||||
|
|
@ -31,7 +31,7 @@ func TestSHA1(t *testing.T) {
|
|||
}
|
||||
|
||||
for _, test := range tests {
|
||||
f, err := ioutil.TempFile("", "sha-test")
|
||||
f, err := os.CreateTemp("", "sha-test")
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue