Add comment for UnmarshalJSON

This commit is contained in:
Carson Hoffman 2021-01-20 19:43:00 -05:00
parent b7a2a4b7fa
commit bd34c3c66d
No known key found for this signature in database
GPG key ID: 05B660CB452C657F

View file

@ -817,6 +817,8 @@ type TooManyRequests struct {
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 {
u := struct {
Bucket string `json:"bucket"`