mirror of
https://github.com/zalando/postgres-operator.git
synced 2026-10-05 21:45:21 +02:00
replace deprecated ioutil (#2531)
* replace deprecated ioutil * replace ioutil also in kubectl plugin
This commit is contained in:
+1
-2
@@ -4,7 +4,6 @@ import (
|
||||
"database/sql"
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
"io/ioutil"
|
||||
"log"
|
||||
"os"
|
||||
"strings"
|
||||
@@ -210,7 +209,7 @@ func GetOperatorNamespace() string {
|
||||
if namespaceFromEnvironment := os.Getenv("OPERATOR_NAMESPACE"); namespaceFromEnvironment != "" {
|
||||
return namespaceFromEnvironment
|
||||
}
|
||||
operatorNamespaceBytes, err := ioutil.ReadFile(fileWithNamespace)
|
||||
operatorNamespaceBytes, err := os.ReadFile(fileWithNamespace)
|
||||
if err != nil {
|
||||
log.Fatalf("Unable to detect operator namespace from within its pod due to: %v", err)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user