Ver código fonte

Use o.Writer if not nil to write output (#330)

Use o.Writer if not nil to write output
Alexey Sudachén 7 anos atrás
pai
commit
7b40afb9bb
1 arquivos alterados com 1 adições e 1 exclusões
  1. 1
    1
      internal/driver/driver.go

+ 1
- 1
internal/driver/driver.go Ver arquivo

138
 
138
 
139
 	// Output to specified file.
139
 	// Output to specified file.
140
 	o.UI.PrintErr("Generating report in ", output)
140
 	o.UI.PrintErr("Generating report in ", output)
141
-	out, err := os.Create(output)
141
+	out, err := o.Writer.Open(output)
142
 	if err != nil {
142
 	if err != nil {
143
 		return err
143
 		return err
144
 	}
144
 	}