Makes it possible to insert additional data into the eventData JSON, which is useful when the eventData comes from the pipeline env.
This also fixes the format of the "data" part of the CloudEvent. If you pass a string to cloudEvent.SetData(), it will be marshalled and ends up with duplicated escape characters (for example {\\\\"testKey\\\\": \\\\"testValue\\\\"}), which causes problems when unmarshalling the data. Passing a map[string]interface{} solves it.
Makes it possible to insert additional data into the
eventData
JSON, which is useful when theeventData
comes from the pipeline env.This also fixes the format of the
"data"
part of the CloudEvent. If you pass a string tocloudEvent.SetData()
, it will be marshalled and ends up with duplicated escape characters (for example{\\\\"testKey\\\\": \\\\"testValue\\\\"}
), which causes problems when unmarshalling the data. Passing amap[string]interface{}
solves it.Changes