Skip to content

Commit

Permalink
Add comment for UnmarshalJSON
Browse files Browse the repository at this point in the history
  • Loading branch information
CarsonHoffman committed Jan 21, 2021
1 parent b7a2a4b commit bd34c3c
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions structs.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"`
Expand Down

0 comments on commit bd34c3c

Please sign in to comment.