|
@@ -53,7 +53,7 @@ func newUI() driver.UI {
|
53
|
53
|
}
|
54
|
54
|
}
|
55
|
55
|
|
56
|
|
-// Read returns a line of text (a command) read from the user.
|
|
56
|
+// ReadLine returns a line of text (a command) read from the user.
|
57
|
57
|
// prompt is printed before reading the command.
|
58
|
58
|
func (r *readlineUI) ReadLine(prompt string) (string, error) {
|
59
|
59
|
r.rl.SetPrompt(prompt)
|
|
@@ -70,7 +70,7 @@ func (r *readlineUI) Print(args ...interface{}) {
|
70
|
70
|
fmt.Fprint(r.rl.Stderr(), text)
|
71
|
71
|
}
|
72
|
72
|
|
73
|
|
-// Print shows a message to the user, colored in red for emphasis.
|
|
73
|
+// PrintErr shows a message to the user, colored in red for emphasis.
|
74
|
74
|
// It is printed over stderr as stdout is reserved for regular output.
|
75
|
75
|
func (r *readlineUI) PrintErr(args ...interface{}) {
|
76
|
76
|
text := fmt.Sprint(args...)
|
|
@@ -97,7 +97,7 @@ func (r *readlineUI) IsTerminal() bool {
|
97
|
97
|
return readline.IsTerminal(int(syscall.Stdout))
|
98
|
98
|
}
|
99
|
99
|
|
100
|
|
-// Start a browser on interactive mode.
|
|
100
|
+// WantBrowser starts a browser on interactive mode.
|
101
|
101
|
func (r *readlineUI) WantBrowser() bool {
|
102
|
102
|
return r.IsTerminal()
|
103
|
103
|
}
|