File tree Expand file tree Collapse file tree 2 files changed +25
-2
lines changed Expand file tree Collapse file tree 2 files changed +25
-2
lines changed Original file line number Diff line number Diff line change @@ -64,9 +64,18 @@ type UI interface {
64
64
// Table creates a table with the given headers
65
65
Table (headers []string ) Table
66
66
67
- // Writer returns writer of the terminal UI
67
+ // Writer returns the output writer of the terminal UI
68
68
Writer () io.Writer
69
69
70
+ // SetWriter sets the writer of the terminal UI
71
+ SetWriter (buf io.Writer )
72
+
73
+ // ErrWriter returns the error writer of the terminal UI
74
+ ErrWriter () io.Writer
75
+
76
+ // SetErrWriter sets the error writer of the terminal UI
77
+ SetErrWriter (buf io.Writer )
78
+
70
79
// Enable or disable quiet mode. Contents passed to Verbose(), Warn(), OK() will be ignored if under quiet mode.
71
80
SetQuiet (bool )
72
81
@@ -217,6 +226,18 @@ func (ui *terminalUI) Writer() io.Writer {
217
226
return ui .Out
218
227
}
219
228
229
+ func (ui * terminalUI ) ErrWriter () io.Writer {
230
+ return ui .ErrOut
231
+ }
232
+
233
+ func (ui * terminalUI ) SetWriter (buf io.Writer ) {
234
+ ui .Out = buf
235
+ }
236
+
237
+ func (ui * terminalUI ) SetErrWriter (buf io.Writer ) {
238
+ ui .ErrOut = buf
239
+ }
240
+
220
241
func (ui * terminalUI ) SetQuiet (quiet bool ) {
221
242
ui .quiet = quiet
222
243
}
Original file line number Diff line number Diff line change 1
1
module github.com/IBM-Cloud/ibm-cloud-cli-sdk
2
2
3
- go 1.22.12
3
+ go 1.23.0
4
+
5
+ toolchain go1.23.6
4
6
5
7
require (
6
8
github.com/fatih/color v1.7.1-0.20180516100307-2d684516a886
You can’t perform that action at this time.
0 commit comments