(ctx context.Context)
| 286 | } |
| 287 | |
| 288 | func listValidLangs(ctx context.Context) []string { |
| 289 | out, err := exec.CommandContext(ctx, "locale", "-a").CombinedOutput() |
| 290 | if err != nil { |
| 291 | log.Printf("error running 'locale -a': %s\n", err) |
| 292 | return []string{} |
| 293 | } |
| 294 | // don't bother with CRLF line endings |
| 295 | // this command doesn't work on windows |
| 296 | return strings.Split(string(out), "\n") |
| 297 | } |
| 298 | |
| 299 | var osLangOnce = &sync.Once{} |
| 300 | var osLang string |
no test coverage detected