initOutputWriter opens the output file for writing.
(path string)
| 31 | |
| 32 | // initOutputWriter opens the output file for writing. |
| 33 | func initOutputWriter(path string) error { |
| 34 | f, err := os.Create(path) |
| 35 | if err != nil { |
| 36 | return err |
| 37 | } |
| 38 | outputWriter = f |
| 39 | return nil |
| 40 | } |
| 41 | |
| 42 | // closeOutputWriter flushes and closes the output file. |
| 43 | // If JSON mode is enabled, writes the accumulated JSON results. |
no outgoing calls