mirror of
https://github.com/zalando/postgres-operator.git
synced 2026-10-18 07:09:25 +02:00
replace deprecated ioutil (#2531)
* replace deprecated ioutil * replace ioutil also in kubectl plugin
This commit is contained in:
@@ -25,8 +25,8 @@ package cmd
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"io/ioutil"
|
||||
"log"
|
||||
"os"
|
||||
|
||||
"github.com/spf13/cobra"
|
||||
v1 "github.com/zalando/postgres-operator/pkg/apis/acid.zalan.do/v1"
|
||||
@@ -56,7 +56,7 @@ func create(fileName string) {
|
||||
if err != nil {
|
||||
log.Fatal(err)
|
||||
}
|
||||
ymlFile, err := ioutil.ReadFile(fileName)
|
||||
ymlFile, err := os.ReadFile(fileName)
|
||||
if err != nil {
|
||||
log.Fatal(err)
|
||||
}
|
||||
|
||||
@@ -25,8 +25,8 @@ package cmd
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"io/ioutil"
|
||||
"log"
|
||||
"os"
|
||||
|
||||
"github.com/spf13/cobra"
|
||||
v1 "github.com/zalando/postgres-operator/pkg/apis/acid.zalan.do/v1"
|
||||
@@ -77,7 +77,7 @@ func deleteByFile(file string) {
|
||||
log.Fatal(err)
|
||||
}
|
||||
|
||||
ymlFile, err := ioutil.ReadFile(file)
|
||||
ymlFile, err := os.ReadFile(file)
|
||||
if err != nil {
|
||||
log.Fatal(err)
|
||||
}
|
||||
|
||||
@@ -25,8 +25,8 @@ package cmd
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"io/ioutil"
|
||||
"log"
|
||||
"os"
|
||||
|
||||
"github.com/spf13/cobra"
|
||||
v1 "github.com/zalando/postgres-operator/pkg/apis/acid.zalan.do/v1"
|
||||
@@ -60,7 +60,7 @@ func updatePgResources(fileName string) {
|
||||
if err != nil {
|
||||
log.Fatal(err)
|
||||
}
|
||||
ymlFile, err := ioutil.ReadFile(fileName)
|
||||
ymlFile, err := os.ReadFile(fileName)
|
||||
if err != nil {
|
||||
log.Fatal(err)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user