diff --git a/sftp/event.go b/sftp/event.go index 040878c..a262f82 100644 --- a/sftp/event.go +++ b/sftp/event.go @@ -32,8 +32,9 @@ func (eh *eventHandler) Log(e models.Event, fa FileAction) error { "files": []string{fa.Entity}, } if fa.Target != "" { - metadata["files"] = []map[string]string{ - {"from": fa.Entity, "to": fa.Target}, + metadata = map[string]interface{}{ + "from": fa.Entity, + "to": fa.Target, } }