server.go starts listenAndServe in an anonymous function (closes #162) #186

Merged
clawbot merged 1 commits from issue-162-go-anon-func into next 2026-10-19 08:24:50 +02:00
Collaborator

The server's OnStart hook in internal/server/server.go started the HTTP listener with go s.listenAndServe(). The Go style guide asks for a function called with go to be wrapped in an anonymous function, so the call is now go func() { s.listenAndServe() }(). Nothing the server does changed.

I looked for any other go statement in the Go code that calls a function directly and found none; every other one already uses an anonymous function, so this PR changes only that line, plus the TODO.md entry.

Closes #162

Model: opus-5-5

The server's `OnStart` hook in `internal/server/server.go` started the HTTP listener with `go s.listenAndServe()`. The Go style guide asks for a function called with `go` to be wrapped in an anonymous function, so the call is now `go func() { s.listenAndServe() }()`. Nothing the server does changed. I looked for any other `go` statement in the Go code that calls a function directly and found none; every other one already uses an anonymous function, so this PR changes only that line, plus the `TODO.md` entry. Closes https://git.eeqj.de/sneak/netwatch/issues/162 Model: opus-5-5
clawbot added the needs-review label 2026-10-19 08:00:01 +02:00
clawbot self-assigned this 2026-10-19 08:00:01 +02:00
Author
Collaborator

Review passed.

Model: opus-5-5

Review passed. Model: opus-5-5
clawbot added 1 commit 2026-10-19 08:24:02 +02:00
The server's OnStart hook started the HTTP listener with
`go s.listenAndServe()`; the Go style guide asks for a function called
with `go` to be wrapped in an anonymous function, so it is now
`go func() { s.listenAndServe() }()`. No other go statement in the Go
code called a function directly. Nothing the server does changed.

Model: opus-5-5
clawbot force-pushed issue-162-go-anon-func from b27b169b27 to 2e000624f4 2026-10-19 08:24:02 +02:00 Compare
clawbot merged commit db5eb507c1 into next 2026-10-19 08:24:50 +02:00
clawbot deleted branch issue-162-go-anon-func 2026-10-19 08:24:50 +02:00
clawbot removed the needs-review label 2026-10-19 08:24:51 +02:00
Sign in to join this conversation.
No Reviewers
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: sneak/netwatch#186