Skip to content

Commit

Permalink
x
Browse files Browse the repository at this point in the history
  • Loading branch information
bassosimone committed Feb 2, 2024
1 parent 625c324 commit 242efbe
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
4 changes: 2 additions & 2 deletions pkg/gobash/main.go
Original file line number Diff line number Diff line change
@@ -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)
}
Expand Down
5 changes: 3 additions & 2 deletions pkg/gobash/version.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import (
"errors"
"fmt"
"io"
"io/ioutil"
"log"
"net/http"
"os"
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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)
}
Expand Down

0 comments on commit 242efbe

Please sign in to comment.