2020-12-20 18:34:11 +00:00
|
|
|
package output
|
|
|
|
|
2021-01-14 07:51:21 +00:00
|
|
|
import (
|
|
|
|
"time"
|
|
|
|
|
|
|
|
jsoniter "github.com/json-iterator/go"
|
|
|
|
)
|
2020-12-20 18:34:11 +00:00
|
|
|
|
|
|
|
// formatJSON formats the output for json based formatting
|
2020-12-25 15:03:52 +00:00
|
|
|
func (w *StandardWriter) formatJSON(output *ResultEvent) ([]byte, error) {
|
2021-01-14 07:51:21 +00:00
|
|
|
output.Timestamp = time.Now()
|
2020-12-25 07:25:46 +00:00
|
|
|
return jsoniter.Marshal(output)
|
2020-12-20 18:34:11 +00:00
|
|
|
}
|