Skip to content

Commit

Permalink
Bump go.mod to 1.19
Browse files Browse the repository at this point in the history
  • Loading branch information
martialblog committed Feb 27, 2023
1 parent d87224f commit 555372f
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 8 deletions.
4 changes: 2 additions & 2 deletions api/response.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"encoding/json"
"fmt"
log "github.com/sirupsen/logrus"
"io/ioutil"
"io"
"net/http"
"net/url"
)
Expand Down Expand Up @@ -46,7 +46,7 @@ func (c *Client) GetJSONResponse(req *http.Request) (data *ResponseBody, err err
}

// read response body
body, err := ioutil.ReadAll(res.Body)
body, err := io.ReadAll(res.Body)
if err != nil {
err = fmt.Errorf("could not retrieve response body: %w", err)
return
Expand Down
4 changes: 2 additions & 2 deletions api/sites_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ package api_test
import (
"github.com/jarcoal/httpmock"
"github.com/stretchr/testify/assert"
"io/ioutil"
"net/http"
"net/url"
"os"
"testing"
)

Expand All @@ -15,7 +15,7 @@ func TestClient_GetSites(t *testing.T) {

httpmock.RegisterResponder("GET", "https://euce1-test.sentinelone.net/web/api/v2.1/sites",
func(req *http.Request) (*http.Response, error) {
data, err := ioutil.ReadFile("testdata/sites.json")
data, err := os.ReadFile("testdata/sites.json")
assert.NoError(t, err)

return httpmock.NewBytesResponse(200, data), nil
Expand Down
4 changes: 2 additions & 2 deletions api/threats_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ package api_test
import (
"github.com/jarcoal/httpmock"
"github.com/stretchr/testify/assert"
"io/ioutil"
"net/http"
"net/url"
"os"
"testing"
)

Expand All @@ -15,7 +15,7 @@ func TestClient_GetThreats(t *testing.T) {

httpmock.RegisterResponder("GET", "https://euce1-test.sentinelone.net/web/api/v2.1/threats",
func(req *http.Request) (*http.Response, error) {
data, err := ioutil.ReadFile("testdata/threats.json")
data, err := os.ReadFile("testdata/threats.json")
assert.NoError(t, err)

return httpmock.NewBytesResponse(200, data), nil
Expand Down
14 changes: 13 additions & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/NETWAYS/check_sentinelone

go 1.14
go 1.19

require (
github.com/NETWAYS/go-check v0.0.0-20200808130510-2fe660cfdef9
Expand All @@ -10,3 +10,15 @@ require (
github.com/stretchr/testify v1.8.2
golang.org/x/oauth2 v0.0.0-20200902213428-5d25da1a8d43
)

require (
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/golang/protobuf v1.4.2 // indirect
github.com/mitchellh/go-ps v1.0.0 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
golang.org/x/net v0.0.0-20200822124328-c89045814202 // indirect
golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8 // indirect
google.golang.org/appengine v1.6.6 // indirect
google.golang.org/protobuf v1.25.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
)
1 change: 0 additions & 1 deletion go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,6 @@ github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ=
github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE=
github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI=
github.com/maxatome/go-testdeep v1.12.0 h1:Ql7Go8Tg0C1D/uMMX59LAoYK7LffeJQ6X2T04nTH68g=
github.com/maxatome/go-testdeep v1.12.0/go.mod h1:lPZc/HAcJMP92l7yI6TRz1aZN5URwUBUAfUNvrclaNM=
github.com/mitchellh/go-ps v1.0.0 h1:i6ampVEEF4wQFF+bkYfwYgY+F/uYJDktmvLPf7qIgjc=
github.com/mitchellh/go-ps v1.0.0/go.mod h1:J4lOc8z8yJs6vUwklHw2XEIiT4z4C40KtWVN3nvg8Pg=
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
Expand Down

0 comments on commit 555372f

Please sign in to comment.