possible bug in slogtest or ReplaceAttr

73 views
Skip to first unread message

jal...@gmail.com

unread,
Aug 18, 2023, 4:16:54 PM8/18/23
to golang-nuts
Hi all,

In slog, I am experimenting with the the ReplaceAttr func in the HandlerOptions with json handler. My understanding is that if i want to remove an attribute then return an empty slog.Attr. However, logtest test fails with a json unmarshal error. Note I am literally using the code example from the official docs.

Is this expected or a  bug? Not sure what my user error is here.


Thanks,
Joe

Sean Liao

unread,
Aug 18, 2023, 6:36:59 PM8/18/23
to golang-nuts
please file it as a bug for jsonhandler

- sean

--
You received this message because you are subscribed to the Google Groups "golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/golang-nuts/89810de6-6a02-440f-988b-9503845a8c90n%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages