Skip to content

Commit

Permalink
fix: linting errors
Browse files Browse the repository at this point in the history
  • Loading branch information
Supreeth Basabattini committed Sep 6, 2023
1 parent e44a21b commit 5574ee1
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 8 deletions.
8 changes: 4 additions & 4 deletions cmd/ocm-backplane/managedJob/createManagedJob_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"bytes"
"errors"
"fmt"
"io/ioutil"
"io"
"net/http"
"os"

Expand Down Expand Up @@ -174,7 +174,7 @@ var _ = Describe("managedJob create command", func() {

Expect(err).To(BeNil())

outPutText, _ := ioutil.ReadAll(outPuts)
outPutText, _ := io.ReadAll(outPuts)
Expect(string(outPutText)).Should(ContainSubstring("Job Succeeded"))
})

Expand Down Expand Up @@ -222,7 +222,7 @@ var _ = Describe("managedJob create command", func() {

Expect(err).To(BeNil())

outPutText, _ := ioutil.ReadAll(outPuts)
outPutText, _ := io.ReadAll(outPuts)
Expect(string(outPutText)).Should(ContainSubstring("Job Failed"))
})

Expand All @@ -243,7 +243,7 @@ var _ = Describe("managedJob create command", func() {

Expect(err).To(BeNil())

outPutText, _ := ioutil.ReadAll(outPuts)
outPutText, _ := io.ReadAll(outPuts)
Expect(string(outPutText)).Should(ContainSubstring("fetching logs for"))
})

Expand Down
3 changes: 1 addition & 2 deletions pkg/utils/renderingutils.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import (
"encoding/json"
"fmt"
"io"
"io/ioutil"
"os"
"strings"
"text/tabwriter"
Expand Down Expand Up @@ -100,7 +99,7 @@ func RenderTable(headers []string, data [][]string) {
// RenderJSON is an effectual function that renders the reader as JSON
// returns err if render fails
func RenderJSON(reader io.Reader) error {
body, err := ioutil.ReadAll(reader)
body, err := io.ReadAll(reader)
if err != nil {
return err
}
Expand Down
4 changes: 2 additions & 2 deletions pkg/utils/util.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package utils
import (
"encoding/json"
"fmt"
"io/ioutil"
"io"
"net"
"net/http"
"os"
Expand Down Expand Up @@ -104,7 +104,7 @@ func MatchBaseDomain(longHostname, baseDomain string) bool {
}

func TryParseBackplaneAPIError(rsp *http.Response) (*BackplaneApi.Error, error) {
bodyBytes, err := ioutil.ReadAll(rsp.Body)
bodyBytes, err := io.ReadAll(rsp.Body)
defer func() { _ = rsp.Body.Close() }()
if err != nil {
return nil, err
Expand Down

0 comments on commit 5574ee1

Please sign in to comment.