Explorar o código

Add comment for UnmarshalJSON

Carson Hoffman %!s(int64=3) %!d(string=hai) anos
pai
achega
bd34c3c66d
Modificáronse 1 ficheiros con 2 adicións e 0 borrados
  1. 2 0
      structs.go

+ 2 - 0
structs.go

@@ -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"`