src/go/doc/testdata/examples/import_groups.golden
raw| 1 | -- .Play -- |
| 2 | package main |
| 3 | |
| 4 | import ( |
| 5 | "fmt" |
| 6 | ) |
| 7 | |
| 8 | func main() { |
| 9 | fmt.Println("Hello, world!") |
| 10 | } |
| 11 | -- .Output -- |
| 12 | Hello, world! |
| 13 | -- Limiter.Play -- |
| 14 | package main |
| 15 | |
| 16 | import ( |
| 17 | "fmt" |
| 18 | "time" |
| 19 | |
| 20 | "golang.org/x/time/rate" |
| 21 | ) |
| 22 | |
| 23 | func main() { |
| 24 | // Uses fmt, time and rate. |
| 25 | l := rate.NewLimiter(rate.Every(time.Second), 1) |
| 26 | fmt.Println(l) |
| 27 | } |