Skip to content

Commit

Permalink
refactor(api/sessionrecording): avoid creating empty struct
Browse files Browse the repository at this point in the history
  • Loading branch information
dustinspecker committed Jan 8, 2025
1 parent 47e5599 commit 126368e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion api/sessionrecording/session_recording.go
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,7 @@ func (r *Reader) Read(ctx context.Context) (apievents.AuditEvent, error) {
if _, err := io.ReadFull(r.gzipReader, messageBytes[:messageSize]); err != nil {
return nil, r.setError(trace.ConvertSystemError(err))
}
oneof := apievents.OneOf{}
var oneof apievents.OneOf
if err := oneof.Unmarshal(messageBytes[:messageSize]); err != nil {
return nil, trace.Wrap(err)
}
Expand Down

0 comments on commit 126368e

Please sign in to comment.