Skip to content

Commit

Permalink
Use WriteFile function from the os package (#36)
Browse files Browse the repository at this point in the history
the ioutil package and functions is deprecated as of Go 1.16
see  https://pkg.go.dev/io/ioutil#WriteFile
  • Loading branch information
EmmanuelKasper committed Nov 11, 2022
1 parent 0044a7d commit e5b1ae5
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions cmd/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import (
"flag"
"fmt"
"io/fs"
"io/ioutil"
"net"
"net/http"
"os"
Expand Down Expand Up @@ -114,7 +113,7 @@ func main() {
if err != nil {
l.Fatal("Failed to serialize kubeconfig", zap.Error(err))
}
if err := ioutil.WriteFile(o.kubeCfg, serialized, 0644); err != nil {
if err := os.WriteFile(o.kubeCfg, serialized, 0644); err != nil {
l.Fatal("Failed to write kubeconfig", zap.Error(err))
}
}
Expand Down

0 comments on commit e5b1ae5

Please sign in to comment.