(ctx context.Context)
| 76 | } |
| 77 | |
| 78 | func locale(ctx context.Context) (string, error) { |
| 79 | if deadline, ok := ctx.Deadline(); ok { |
| 80 | if deadline.Sub(time.Now().Add(1*time.Minute)) <= 0 { |
| 81 | return "", context.DeadlineExceeded |
| 82 | } |
| 83 | } |
| 84 | |
| 85 | select { |
| 86 | case <-ctx.Done(): |
| 87 | return "", ctx.Err() |
| 88 | case <-time.After(1 * time.Minute): |
| 89 | } |
| 90 | return "EN/US", nil |
| 91 | } |
no outgoing calls
no test coverage detected