Add comment for UnmarshalJSON
This commit is contained in:
parent
b7a2a4b7fa
commit
bd34c3c66d
1 changed files with 2 additions and 0 deletions
|
@ -817,6 +817,8 @@ type TooManyRequests struct {
|
||||||
RetryAfter time.Duration `json:"retry_after"`
|
RetryAfter time.Duration `json:"retry_after"`
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// UnmarshalJSON helps support translation of a milliseconds-based float
|
||||||
|
// into a time.Duration on TooManyRequests.
|
||||||
func (t *TooManyRequests) UnmarshalJSON(b []byte) error {
|
func (t *TooManyRequests) UnmarshalJSON(b []byte) error {
|
||||||
u := struct {
|
u := struct {
|
||||||
Bucket string `json:"bucket"`
|
Bucket string `json:"bucket"`
|
||||||
|
|
Loading…
Reference in a new issue