fix build error

Signed-off-by: Leo Chen <leo@harmony.one>
pull/253/head
Leo Chen 4 years ago
parent 870491133b
commit bc3f026798
No known key found for this signature in database
GPG Key ID: 9A0417092EBC5E96
  1. 2
      go.mod
  2. 7
      pkg/governance/request.go

@ -31,7 +31,7 @@ require (
github.com/uber/jaeger-client-go v2.20.1+incompatible // indirect
github.com/uber/jaeger-lib v2.2.0+incompatible // indirect
github.com/valyala/fasthttp v1.2.0
github.com/valyala/fastjson v1.6.3 // indirect
github.com/valyala/fastjson v1.6.3
github.com/wangjia184/sortedset v0.0.0-20160527075905-f5d03557ba30 // indirect
golang.org/x/crypto v0.0.0-20200820211705-5c72a883971a
gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b

@ -4,9 +4,10 @@ import (
"bytes"
"encoding/json"
"fmt"
"github.com/valyala/fastjson"
"io"
"io/ioutil"
"net/http"
"github.com/valyala/fastjson"
)
func getAndParse(url governanceApi, data interface{}) error {
@ -30,7 +31,7 @@ func postAndParse(url governanceApi, postData []byte, data interface{}) error {
}
func parseAndUnmarshal(resp *http.Response, data interface{}) error {
bodyData, err := io.ReadAll(resp.Body)
bodyData, err := ioutil.ReadAll(resp.Body)
if err != nil {
return err
}

Loading…
Cancel
Save