Ver código fonte

Add comment for UnmarshalJSON

Carson Hoffman 3 anos atrás
pai
commit
bd34c3c66d
1 arquivos alterados com 2 adições e 0 exclusões
  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"`