(ctx context.Context, dur time.Duration)
| 35 | } |
| 36 | |
| 37 | func Sleep(ctx context.Context, dur time.Duration) error { |
| 38 | t := time.NewTimer(dur) |
| 39 | defer t.Stop() |
| 40 | |
| 41 | select { |
| 42 | case <-t.C: |
| 43 | return nil |
| 44 | case <-ctx.Done(): |
| 45 | return ctx.Err() |
| 46 | } |
| 47 | } |
| 48 | |
| 49 | func ToLower(s string) string { |
| 50 | if isLower(s) { |
no test coverage detected