[Vendor] update go-swagger v0.21.0 -> v0.25.0 (#12670)
* Update go-swagger * vendor
This commit is contained in:
parent
66843f2237
commit
3270e7a443
350 changed files with 26353 additions and 5552 deletions
8
vendor/github.com/go-openapi/swag/json.go
generated
vendored
8
vendor/github.com/go-openapi/swag/json.go
generated
vendored
|
@ -51,7 +51,7 @@ type ejUnmarshaler interface {
|
|||
UnmarshalEasyJSON(w *jlexer.Lexer)
|
||||
}
|
||||
|
||||
// WriteJSON writes json data, prefers finding an appropriate interface to short-circuit the marshaller
|
||||
// WriteJSON writes json data, prefers finding an appropriate interface to short-circuit the marshaler
|
||||
// so it takes the fastest option available.
|
||||
func WriteJSON(data interface{}) ([]byte, error) {
|
||||
if d, ok := data.(ejMarshaler); ok {
|
||||
|
@ -65,8 +65,8 @@ func WriteJSON(data interface{}) ([]byte, error) {
|
|||
return json.Marshal(data)
|
||||
}
|
||||
|
||||
// ReadJSON reads json data, prefers finding an appropriate interface to short-circuit the unmarshaller
|
||||
// so it takes the fastes option available
|
||||
// ReadJSON reads json data, prefers finding an appropriate interface to short-circuit the unmarshaler
|
||||
// so it takes the fastest option available
|
||||
func ReadJSON(data []byte, value interface{}) error {
|
||||
trimmedData := bytes.Trim(data, "\x00")
|
||||
if d, ok := value.(ejUnmarshaler); ok {
|
||||
|
@ -189,7 +189,7 @@ func FromDynamicJSON(data, target interface{}) error {
|
|||
return json.Unmarshal(b, target)
|
||||
}
|
||||
|
||||
// NameProvider represents an object capabale of translating from go property names
|
||||
// NameProvider represents an object capable of translating from go property names
|
||||
// to json property names
|
||||
// This type is thread-safe.
|
||||
type NameProvider struct {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue