(msg string, def string)
| 63 | } |
| 64 | |
| 65 | func getParamOrDef(msg string, def string) string { |
| 66 | fmt.Print(msg + ": ") |
| 67 | rr := bufio.NewReader(os.Stdin) |
| 68 | if res, e := rr.ReadString('\n'); e == nil && res != "\n" { |
| 69 | res = strings.ReplaceAll(res, "\t", "") |
| 70 | res = strings.ReplaceAll(res, "\n", "") |
| 71 | res = strings.ReplaceAll(res, "\r", "") |
| 72 | if res == "" { |
| 73 | return def |
| 74 | } else { |
| 75 | return res |
| 76 | } |
| 77 | } |
| 78 | return def |
| 79 | } |
| 80 | |
| 81 | func printHead() { |
| 82 | println(` |
no test coverage detected