Skip to content

Commit 17c2cc5

Browse files
committed
remove Event.UnmarshalJSON
1 parent 433f774 commit 17c2cc5

File tree

1 file changed

+0
-15
lines changed

1 file changed

+0
-15
lines changed

event.go

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -120,21 +120,6 @@ func (e Event) MarshalJSON() ([]byte, error) {
120120
return json.Marshal(h)
121121
}
122122

123-
// UnmarshalJSON is a Go function that unmarshal the Event from JSON.
124-
func (e *Event) UnmarshalJSON(data []byte) error {
125-
e.headers = make(map[string]string)
126-
if err := json.Unmarshal(data, &e.headers); err != nil {
127-
return err
128-
}
129-
130-
if e.headers["_body"] != "" {
131-
e.body = []byte(e.headers["_body"])
132-
delete(e.headers, "_body")
133-
}
134-
135-
return nil
136-
}
137-
138123
// LogValue returns the log value of the Event.
139124
//
140125
// It returns a slog.Value that contains the name and sequence of the Event.

0 commit comments

Comments
 (0)