diff options
| author | Stefan Majewsky <stefan.majewsky@sap.com> | 2023-10-25 15:54:11 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-10-25 15:54:11 +0200 |
| commit | d51753b8a70daba25c8bfff1b99ab6551e3f9dde (patch) | |
| tree | ab0ff39b23534fae74b9347f1b81c42318ef39fd /internal/prompt/cloud.go | |
| parent | 8ed9ced09964a0f70ffcadd0aa8d25c7bc339352 (diff) | |
| parent | b8ad9b9e0c456d7b71ca4dd17bb08f46b1dbd5ca (diff) | |
| download | gofu-d51753b8a70daba25c8bfff1b99ab6551e3f9dde.tar.gz | |
Merge pull request #12 from SuperSandro2000/ioutil
Remove deprecated ioutil
Diffstat (limited to 'internal/prompt/cloud.go')
| -rw-r--r-- | internal/prompt/cloud.go | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/internal/prompt/cloud.go b/internal/prompt/cloud.go index 42a2c39..ce3160f 100644 --- a/internal/prompt/cloud.go +++ b/internal/prompt/cloud.go @@ -19,7 +19,6 @@ package prompt import ( - "io/ioutil" "os" "os/exec" "path/filepath" @@ -47,7 +46,7 @@ func getKubernetesField() string { return "" } - namespaceBytes, err := ioutil.ReadFile(filepath.Join(os.Getenv("HOME"), ".kubectl-namespace")) + namespaceBytes, err := os.ReadFile(filepath.Join(os.Getenv("HOME"), ".kubectl-namespace")) namespace := strings.TrimSpace(string(namespaceBytes)) if err != nil { if !os.IsNotExist(err) { @@ -60,7 +59,7 @@ func getKubernetesField() string { } func getKubernetesContext(configPath string) string { - buf, err := ioutil.ReadFile(configPath) + buf, err := os.ReadFile(configPath) if err != nil { //non-existence is acceptable, just make the caller continue with the next configPath if !os.IsNotExist(err) { |
