-- .Play -- | |
package main | |
import ( | |
"fmt" | |
) | |
func main() { | |
fmt.Println("Hello, world!") | |
} | |
-- .Output -- | |
Hello, world! | |
-- Limiter.Play -- | |
package main | |
import ( | |
"fmt" | |
"time" | |
"golang.org/x/time/rate" | |
) | |
func main() { | |
// Uses fmt, time and rate. | |
l := rate.NewLimiter(rate.Every(time.Second), 1) | |
fmt.Println(l) | |
} |