diff --git a/go/vt/vtgate/api.go b/go/vt/vtgate/api.go index 0f2ad5c24b7..51ea913e0b2 100644 --- a/go/vt/vtgate/api.go +++ b/go/vt/vtgate/api.go @@ -19,12 +19,10 @@ package vtgate import ( "encoding/json" "fmt" - "io/ioutil" "net/http" "strings" "golang.org/x/net/context" - "vitess.io/vitess/go/vt/discovery" "vitess.io/vitess/go/vt/log" ) @@ -90,14 +88,6 @@ func getItemPath(url string) string { return parts[1] } -func unmarshalRequest(r *http.Request, v interface{}) error { - data, err := ioutil.ReadAll(r.Body) - if err != nil { - return err - } - return json.Unmarshal(data, v) -} - func initAPI(ctx context.Context, hc discovery.HealthCheck) { // Healthcheck real time status per (cell, keyspace, tablet type, metric). handleCollection("health-check", func(r *http.Request) (interface{}, error) {