diff --git a/pkg/gobash/main.go b/pkg/gobash/main.go index 40c0ea0f6..8a2788a9b 100644 --- a/pkg/gobash/main.go +++ b/pkg/gobash/main.go @@ -1,13 +1,13 @@ package main import ( + "io/ioutil" "log" - "os" ) func main() { // read the content of GOVERSION - data, err := os.ReadFile("GOVERSION") + data, err := ioutil.ReadFile("GOVERSION") if err != nil { log.Fatal(err) } diff --git a/pkg/gobash/version.go b/pkg/gobash/version.go index 563517c23..190a6aed9 100644 --- a/pkg/gobash/version.go +++ b/pkg/gobash/version.go @@ -12,6 +12,7 @@ import ( "errors" "fmt" "io" + "io/ioutil" "log" "net/http" "os" @@ -147,7 +148,7 @@ func install(targetDir, version string) error { if err := unpackArchive(targetDir, archiveFile); err != nil { return fmt.Errorf("extracting archive %v: %v", archiveFile, err) } - if err := os.WriteFile(filepath.Join(targetDir, unpackedOkay), nil, 0644); err != nil { + if err := ioutil.WriteFile(filepath.Join(targetDir, unpackedOkay), nil, 0644); err != nil { return err } log.Printf("Success. You may now run '%v'", version) @@ -318,7 +319,7 @@ func slurpURLToString(url_ string) (string, error) { if res.StatusCode != http.StatusOK { return "", fmt.Errorf("%s: %v", url_, res.Status) } - slurp, err := io.ReadAll(res.Body) + slurp, err := ioutil.ReadAll(res.Body) if err != nil { return "", fmt.Errorf("reading %s: %v", url_, err) }