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