diff options
| author | Philipp Tanlak <philipp.tanlak@gmail.com> | 2023-10-11 19:53:56 +0200 |
|---|---|---|
| committer | Philipp Tanlak <philipp.tanlak@gmail.com> | 2023-10-11 19:53:56 +0200 |
| commit | a77e30e43fdca6caafe18c648d632496fd38eca0 (patch) | |
| tree | aab0040aa9dba4517962307762796338f21ac42f /modules/jsonprint | |
| parent | 1fc497fbdc79a43c62ac2e8eaf4827752dbeef8e (diff) | |
Fix jsonprint output in dev mode
Diffstat (limited to 'modules/jsonprint')
| -rw-r--r-- | modules/jsonprint/jsonprint.go | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/modules/jsonprint/jsonprint.go b/modules/jsonprint/jsonprint.go index 29d3375..a4be5c9 100644 --- a/modules/jsonprint/jsonprint.go +++ b/modules/jsonprint/jsonprint.go @@ -49,7 +49,9 @@ func (m *Module) ReceiveResponse(resp *flyscrape.Response) { } func (m *Module) Finalize() { - fmt.Println("\n]") + if m.once { + fmt.Println("\n]") + } } type output struct { |