File tree 3 files changed +25
-44
lines changed
3 files changed +25
-44
lines changed Original file line number Diff line number Diff line change @@ -193,12 +193,12 @@ func run(cmd *cobra.Command, args []string) {
193
193
}
194
194
195
195
// Print the results
196
- feedback .PrintResult (& flashResult {
197
- Programmer : (& ExecOutput {
196
+ feedback .PrintResult (& flasher. FlashResult {
197
+ Programmer : (& flasher. ExecOutput {
198
198
Stdout : programmerOut .String (),
199
199
Stderr : programmerErr .String (),
200
200
}),
201
- Flasher : (& ExecOutput {
201
+ Flasher : (& flasher. ExecOutput {
202
202
Stdout : flasherOut .String (),
203
203
Stderr : flasherErr .String (),
204
204
}),
@@ -208,22 +208,3 @@ func run(cmd *cobra.Command, args []string) {
208
208
os .Exit (errorcodes .ErrGeneric )
209
209
}
210
210
}
211
-
212
- type flashResult struct {
213
- Programmer * ExecOutput `json:"programmer"`
214
- Flasher * ExecOutput `json:"flasher"`
215
- }
216
-
217
- type ExecOutput struct {
218
- Stdout string `json:"stdout"`
219
- Stderr string `json:"stderr"`
220
- }
221
-
222
- func (r * flashResult ) Data () interface {} {
223
- return r
224
- }
225
-
226
- func (r * flashResult ) String () string {
227
- // The output is already printed via os.Stdout/os.Stdin
228
- return ""
229
- }
Original file line number Diff line number Diff line change @@ -218,12 +218,12 @@ func run(cmd *cobra.Command, args []string) {
218
218
}
219
219
220
220
// Print the results
221
- feedback .PrintResult (& flashResult {
222
- Programmer : (& ExecOutput {
221
+ feedback .PrintResult (& flasher. FlashResult {
222
+ Programmer : (& flasher. ExecOutput {
223
223
Stdout : programmerOut .String (),
224
224
Stderr : programmerErr .String (),
225
225
}),
226
- Flasher : (& ExecOutput {
226
+ Flasher : (& flasher. ExecOutput {
227
227
Stdout : flasherOut .String (),
228
228
Stderr : flasherErr .String (),
229
229
}),
@@ -233,22 +233,3 @@ func run(cmd *cobra.Command, args []string) {
233
233
os .Exit (errorcodes .ErrGeneric )
234
234
}
235
235
}
236
-
237
- type flashResult struct {
238
- Programmer * ExecOutput `json:"programmer"`
239
- Flasher * ExecOutput `json:"flasher"`
240
- }
241
-
242
- type ExecOutput struct {
243
- Stdout string `json:"stdout"`
244
- Stderr string `json:"stderr"`
245
- }
246
-
247
- func (r * flashResult ) Data () interface {} {
248
- return r
249
- }
250
-
251
- func (r * flashResult ) String () string {
252
- // The output is already printed via os.Stdout/os.Stdin
253
- return ""
254
- }
Original file line number Diff line number Diff line change @@ -93,3 +93,22 @@ func openSerial(portAddress string) (serial.Port, error) {
93
93
94
94
return nil , lastError
95
95
}
96
+
97
+ type FlashResult struct {
98
+ Programmer * ExecOutput `json:"programmer"`
99
+ Flasher * ExecOutput `json:"flasher"`
100
+ }
101
+
102
+ type ExecOutput struct {
103
+ Stdout string `json:"stdout"`
104
+ Stderr string `json:"stderr"`
105
+ }
106
+
107
+ func (r * FlashResult ) Data () interface {} {
108
+ return r
109
+ }
110
+
111
+ func (r * FlashResult ) String () string {
112
+ // The output is already printed via os.Stdout/os.Stdin
113
+ return ""
114
+ }
You can’t perform that action at this time.
0 commit comments