Askf prints an question with optional format verbs. The leading symbol differs in color depending on whether the input is masked.
(msg string, masked bool, v ...interface{})
| 95 | // Askf prints an question with optional format verbs. The leading symbol differs in color depending |
| 96 | // on whether the input is masked. |
| 97 | func Askf(msg string, masked bool, v ...interface{}) { |
| 98 | symbolChar := "[?]" |
| 99 | |
| 100 | var symbol string |
| 101 | if masked { |
| 102 | symbol = ColorGray.Sprintf("%s", symbolChar) |
| 103 | } else { |
| 104 | symbol = ColorGreen.Sprintf("%s", symbolChar) |
| 105 | } |
| 106 | |
| 107 | fmt.Fprintf(color.Output, "%s%s %s: ", indent, symbol, fmt.Sprintf(msg, v...)) |
| 108 | } |
| 109 | |
| 110 | // isDebug returns true if debug mode is enabled |
| 111 | func isDebug() bool { |
no outgoing calls
no test coverage detected