You signed in with another tab or window.Reload to refresh your session.You signed out in another tab or window.Reload to refresh your session.You switched accounts on another tab or window.Reload to refresh your session.Dismiss alert
package mainimport ("fmt""github.com/aide-family/rate""time")funcmain() {// This limiter allows for the generation of 3 tokens within a 10 second window with a minimum interval of 2 seconds.limiter:=rate.NewLimiter(3,10*time.Second,2*time.Second)iflimiter.Allow() {fmt.Println("allow")}else{fmt.Println("not allow") }}