Skip to content

Commit d68bd4b

Browse files
authored
Merge pull request #160 from mhofstetter/feature/golangci-lint
build: fix golangci-lint SA1019 io/ioutil
2 parents f7f0191 + b7b9982 commit d68bd4b

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

klient/conf/main_test.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ package conf
1818

1919
import (
2020
"flag"
21-
"io/ioutil"
2221
"os"
2322
"path/filepath"
2423
"strings"
@@ -77,7 +76,7 @@ func setup() {
7776
}
7877

7978
func createFile(path, data string) error {
80-
return ioutil.WriteFile(path, []byte(data), 0o644)
79+
return os.WriteFile(path, []byte(data), 0o644)
8180
}
8281

8382
// genKubeconfig used to genearte kube config file

support/kind/kind.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ import (
2020
"bytes"
2121
"fmt"
2222
"io"
23-
"io/ioutil"
2423
"os"
2524
"strings"
2625

@@ -63,7 +62,7 @@ func (k *Cluster) getKubeconfig() (string, error) {
6362
return "", fmt.Errorf("kind get kubeconfig: %s: %w", p.Result(), p.Err())
6463
}
6564

66-
file, err := ioutil.TempFile("", fmt.Sprintf("kind-cluser-%s", kubecfg))
65+
file, err := os.CreateTemp("", fmt.Sprintf("kind-cluser-%s", kubecfg))
6766
if err != nil {
6867
return "", fmt.Errorf("kind kubeconfig file: %w", err)
6968
}

0 commit comments

Comments
 (0)