lib/promscrape/discovery/azure: remove unneeded conversion to string

This commit is contained in:
Aliaksandr Valialkin 2022-10-01 16:04:37 +03:00
parent 973ce4b561
commit f86070169d
No known key found for this signature in database
GPG key ID: A72BEC6CD3D0DED1

View file

@ -232,7 +232,7 @@ func getRefreshTokenFunc(sdc *SDConfig, ac, proxyAC *promauth.Config, env *cloud
} }
var tr tokenResponse var tr tokenResponse
if err := json.Unmarshal(data, &tr); err != nil { if err := json.Unmarshal(data, &tr); err != nil {
return "", 0, fmt.Errorf("cannot parse token auth response %q: %w", string(data), err) return "", 0, fmt.Errorf("cannot parse token auth response %q: %w", data, err)
} }
expiresInSeconds, err := strconv.ParseInt(tr.ExpiresIn, 10, 64) expiresInSeconds, err := strconv.ParseInt(tr.ExpiresIn, 10, 64)
if err != nil { if err != nil {