Update cri to 4ea022f82a55c449bf15bfc62ac8b0de968d81be.
Signed-off-by: Lantao Liu <lantaol@google.com>
This commit is contained in:
7
vendor/github.com/emicklei/go-restful/entity_accessors.go
generated
vendored
7
vendor/github.com/emicklei/go-restful/entity_accessors.go
generated
vendored
@@ -5,7 +5,6 @@ package restful
|
||||
// that can be found in the LICENSE file.
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"encoding/xml"
|
||||
"strings"
|
||||
"sync"
|
||||
@@ -128,7 +127,7 @@ type entityJSONAccess struct {
|
||||
|
||||
// Read unmarshalls the value from JSON
|
||||
func (e entityJSONAccess) Read(req *Request, v interface{}) error {
|
||||
decoder := json.NewDecoder(req.Request.Body)
|
||||
decoder := NewDecoder(req.Request.Body)
|
||||
decoder.UseNumber()
|
||||
return decoder.Decode(v)
|
||||
}
|
||||
@@ -147,7 +146,7 @@ func writeJSON(resp *Response, status int, contentType string, v interface{}) er
|
||||
}
|
||||
if resp.prettyPrint {
|
||||
// pretty output must be created and written explicitly
|
||||
output, err := json.MarshalIndent(v, " ", " ")
|
||||
output, err := MarshalIndent(v, "", " ")
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
@@ -159,5 +158,5 @@ func writeJSON(resp *Response, status int, contentType string, v interface{}) er
|
||||
// not-so-pretty
|
||||
resp.Header().Set(HEADER_ContentType, contentType)
|
||||
resp.WriteHeader(status)
|
||||
return json.NewEncoder(resp).Encode(v)
|
||||
return NewEncoder(resp).Encode(v)
|
||||
}
|
||||
|
Reference in New Issue
Block a user