Update vendor directory

This commit is contained in:
Nick Craig-Wood 2017-01-02 16:12:05 +00:00
parent 5b8b379feb
commit 1cad759306
69 changed files with 4846 additions and 897 deletions

View file

@ -6,6 +6,7 @@ package googleapi
import (
"encoding/json"
"errors"
"strconv"
)
@ -149,6 +150,25 @@ func (s Float64s) MarshalJSON() ([]byte, error) {
})
}
// RawMessage is a raw encoded JSON value.
// It is identical to json.RawMessage, except it does not suffer from
// https://golang.org/issue/14493.
type RawMessage []byte
// MarshalJSON returns m.
func (m RawMessage) MarshalJSON() ([]byte, error) {
return m, nil
}
// UnmarshalJSON sets *m to a copy of data.
func (m *RawMessage) UnmarshalJSON(data []byte) error {
if m == nil {
return errors.New("googleapi.RawMessage: UnmarshalJSON on nil pointer")
}
*m = append((*m)[:0], data...)
return nil
}
/*
* Helper routines for simplifying the creation of optional fields of basic type.
*/