Re: [go-nuts] mutex in slog/handler.go?

2024-05-24 Thread Harris, Andrew
The mutex field of the common handler struct became a pointer-to-mutex at some point IIRC - it is currently, so copying should be fine. Get Outlook for iOS From: golang-nuts@googlegroups.com on behalf of Eli Lindsey Sent: Friday, May 24,

Re: [go-nuts] mutex in slog/handler.go?

2024-05-24 Thread Eli Lindsey
Git blame may be helpful, and specifically commit 847d40d6998. It looks like code drifted from the comment.-eli On May 24, 2024, at 9:25 AM, Jochen Voss wrote:Hello,In the Go standard library, in the file log/slog/handler.go, I found the following code:func (h *commonHandler) clone() *commonHandl

[go-nuts] mutex in slog/handler.go?

2024-05-24 Thread Jochen Voss
Hello, In the Go standard library, in the file log/slog/handler.go, I found the following code: func (h *commonHandler) clone() *commonHandler { // We can't use assignment because we can't copy the mutex. return &commonHandler{ json: h.json, opts: h.opts, preformattedAt