Bruce Marriner 7 年之前
父節點
當前提交
8c52d97c1e
共有 2 個文件被更改,包括 4 次插入1 次删除
  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