File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -123,10 +123,11 @@ func (e *generateError) Error() string {
123
123
124
124
type goimportError struct {
125
125
output string
126
+ error error
126
127
}
127
128
128
129
func (e * goimportError ) Error () string {
129
- return fmt .Sprintf ("GoImport failed to format:\n %v" , e .output )
130
+ return fmt .Sprintf ("GoImport failed to format:\n %v\n %v " , e .output , e . error )
130
131
}
131
132
132
133
type service struct {
@@ -238,7 +239,7 @@ func main() {
238
239
}
239
240
out , err := exec .Command ("goimports" , "-w" , outdir ).CombinedOutput ()
240
241
if err != nil {
241
- errors = append (errors , & goimportError {string (out )})
242
+ errors = append (errors , & goimportError {string (out ), err })
242
243
}
243
244
244
245
testdir , err := testDir ()
@@ -247,7 +248,7 @@ func main() {
247
248
}
248
249
out , err = exec .Command ("goimports" , "-w" , testdir ).CombinedOutput ()
249
250
if err != nil {
250
- errors = append (errors , & goimportError {string (out )})
251
+ errors = append (errors , & goimportError {string (out ), err })
251
252
}
252
253
253
254
if len (errors ) > 0 {
You can’t perform that action at this time.
0 commit comments