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 @@ -190,12 +190,12 @@ func run(cmd *cobra.Command, args []string) {
190
190
}
191
191
192
192
// Print the results
193
- feedback .PrintResult (& flashResult {
194
- Programmer : (& ExecOutput {
193
+ feedback .PrintResult (& flasher. FlashResult {
194
+ Programmer : (& flasher. ExecOutput {
195
195
Stdout : programmerOut .String (),
196
196
Stderr : programmerErr .String (),
197
197
}),
198
- Flasher : (& ExecOutput {
198
+ Flasher : (& flasher. ExecOutput {
199
199
Stdout : flasherOut .String (),
200
200
Stderr : flasherErr .String (),
201
201
}),
@@ -205,22 +205,3 @@ func run(cmd *cobra.Command, args []string) {
205
205
os .Exit (errorcodes .ErrGeneric )
206
206
}
207
207
}
208
-
209
- type flashResult struct {
210
- Programmer * ExecOutput `json:"programmer"`
211
- Flasher * ExecOutput `json:"flasher"`
212
- }
213
-
214
- type ExecOutput struct {
215
- Stdout string `json:"stdout"`
216
- Stderr string `json:"stderr"`
217
- }
218
-
219
- func (r * flashResult ) Data () interface {} {
220
- return r
221
- }
222
-
223
- func (r * flashResult ) String () string {
224
- // The output is already printed via os.Stdout/os.Stdin
225
- return ""
226
- }
Original file line number Diff line number Diff line change @@ -216,12 +216,12 @@ func run(cmd *cobra.Command, args []string) {
216
216
}
217
217
218
218
// Print the results
219
- feedback .PrintResult (& flashResult {
220
- Programmer : (& ExecOutput {
219
+ feedback .PrintResult (& flasher. FlashResult {
220
+ Programmer : (& flasher. ExecOutput {
221
221
Stdout : programmerOut .String (),
222
222
Stderr : programmerErr .String (),
223
223
}),
224
- Flasher : (& ExecOutput {
224
+ Flasher : (& flasher. ExecOutput {
225
225
Stdout : flasherOut .String (),
226
226
Stderr : flasherErr .String (),
227
227
}),
@@ -231,22 +231,3 @@ func run(cmd *cobra.Command, args []string) {
231
231
os .Exit (errorcodes .ErrGeneric )
232
232
}
233
233
}
234
-
235
- type flashResult struct {
236
- Programmer * ExecOutput `json:"programmer"`
237
- Flasher * ExecOutput `json:"flasher"`
238
- }
239
-
240
- type ExecOutput struct {
241
- Stdout string `json:"stdout"`
242
- Stderr string `json:"stderr"`
243
- }
244
-
245
- func (r * flashResult ) Data () interface {} {
246
- return r
247
- }
248
-
249
- func (r * flashResult ) String () string {
250
- // The output is already printed via os.Stdout/os.Stdin
251
- return ""
252
- }
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