Bruce Marriner hace 7 años
padre
commit
8c52d97c1e
Se han modificado 2 ficheros con 4 adiciones y 1 borrados
  1. 2 0
      ratelimit.go
  2. 2 1
      structs.go

+ 2 - 0
ratelimit.go

@@ -67,6 +67,8 @@ func (r *RateLimiter) GetBucket(key string) *Bucket {
 	r.buckets[key] = b
 	return b
 }
+
+// GetWaitTime returns the duration you should wait for a Bucket
 func (r *RateLimiter) GetWaitTime(b *Bucket, minRemaining int) time.Duration {
 	// If we ran out of calls and the reset time is still ahead of us
 	// then we need to take it easy and relax a little

+ 2 - 1
structs.go

@@ -313,9 +313,10 @@ type Presence struct {
 	Since  *int     `json:"since"`
 }
 
-// A game type
+// GameType is the type of "game" (see GameType* consts) in the Game struct
 type GameType int
 
+// Valid GameType values
 const (
 	GameTypeGame GameType = iota
 	GameTypeStreaming