Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
小 白蛋
SigNoz
Commits
3c397735
Commit
3c397735
authored
2 years ago
by
nityanandagohain
Browse files
Options
Download
Email Patches
Plain Diff
fix: ioutil.ReadAll changed to io.ReadAll
parent
a4d84591
feat/usage-reporting
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
pkg/query-service/ee/integrations/signozio/signozio.go
+3
-4
pkg/query-service/ee/integrations/signozio/signozio.go
with
3 additions
and
4 deletions
+3
-4
pkg/query-service/ee/integrations/signozio/signozio.go
+
3
-
4
View file @
3c397735
...
...
@@ -6,7 +6,6 @@ import (
"encoding/json"
"fmt"
"io"
"io/ioutil"
"net/http"
"github.com/pkg/errors"
...
...
@@ -49,7 +48,7 @@ func ActivateLicense(key, siteId string) (*ActivationResponse, *model.ApiError)
return
nil
,
model
.
BadRequest
(
errors
.
Wrap
(
err
,
"unable to connect with license.signoz.io, please check your network connection"
))
}
httpBody
,
err
:=
io
util
.
ReadAll
(
httpResponse
.
Body
)
httpBody
,
err
:=
io
.
ReadAll
(
httpResponse
.
Body
)
if
err
!=
nil
{
return
nil
,
model
.
BadRequest
(
errors
.
Wrap
(
err
,
"failed to read activation response from license.signoz.io"
))
}
...
...
@@ -89,7 +88,7 @@ func ValidateLicense(activationId string) (*ActivationResponse, *model.ApiError)
return
nil
,
model
.
BadRequest
(
errors
.
Wrap
(
err
,
"unable to connect with license.signoz.io, please check your network connection"
))
}
body
,
err
:=
io
util
.
ReadAll
(
response
.
Body
)
body
,
err
:=
io
.
ReadAll
(
response
.
Body
)
if
err
!=
nil
{
return
nil
,
model
.
BadRequest
(
errors
.
Wrap
(
err
,
"failed to read validation response from license.signoz.io"
))
}
...
...
@@ -137,7 +136,7 @@ func SendUsage(ctx context.Context, usage *model.UsagePayload) *model.ApiError {
return
model
.
BadRequest
(
errors
.
Wrap
(
err
,
"unable to connect with license.signoz.io, please check your network connection"
))
}
body
,
err
:=
io
util
.
ReadAll
(
res
.
Body
)
body
,
err
:=
io
.
ReadAll
(
res
.
Body
)
if
err
!=
nil
{
return
model
.
BadRequest
(
errors
.
Wrap
(
err
,
"failed to read usage response from license.signoz.io"
))
}
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment
Menu
Projects
Groups
Snippets
Help