Skip to content

Commit

Permalink
build: fix golangci-lint SA1019 io/ioutil
Browse files Browse the repository at this point in the history
  • Loading branch information
mhofstetter committed Sep 7, 2022
1 parent f7f0191 commit b7b9982
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
3 changes: 1 addition & 2 deletions klient/conf/main_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ package conf

import (
"flag"
"io/ioutil"
"os"
"path/filepath"
"strings"
Expand Down Expand Up @@ -77,7 +76,7 @@ func setup() {
}

func createFile(path, data string) error {
return ioutil.WriteFile(path, []byte(data), 0o644)
return os.WriteFile(path, []byte(data), 0o644)
}

// genKubeconfig used to genearte kube config file
Expand Down
3 changes: 1 addition & 2 deletions support/kind/kind.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ import (
"bytes"
"fmt"
"io"
"io/ioutil"
"os"
"strings"

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

file, err := ioutil.TempFile("", fmt.Sprintf("kind-cluser-%s", kubecfg))
file, err := os.CreateTemp("", fmt.Sprintf("kind-cluser-%s", kubecfg))
if err != nil {
return "", fmt.Errorf("kind kubeconfig file: %w", err)
}
Expand Down

0 comments on commit b7b9982

Please sign in to comment.