Output output result to writable io device
(writer io.Writer, res []*Result)
| 248 | |
| 249 | // Output output result to writable io device |
| 250 | func (*Scanner) Output(writer io.Writer, res []*Result) error { |
| 251 | bytes, err := json.Marshal(res) |
| 252 | if err != nil { |
| 253 | return err |
| 254 | } |
| 255 | if _, err := writer.Write(bytes); err != nil { |
| 256 | return err |
| 257 | } |
| 258 | return nil |
| 259 | } |
| 260 | |
| 261 | // Output send the specified content to the console or file |
| 262 | func Output(out string, scanner *Scanner, res []*Result) { |
no outgoing calls