mirror of
https://github.com/tiennm99/noitu.git
synced 2026-10-14 08:18:34 +00:00
bot.BoardFor and hub.roomCount were reachable from tests only and now live beside them; session.serve drops an always-true nil check (readLoop never returns nil); invisible characters in test literals become escapes; comments no longer cite plan phases; `.dockerignore` keeps the dump out of the build context. No behaviour change; vet, deadcode, staticcheck, go test -race, svelte-check and vitest green.
10 lines
223 B
Go
10 lines
223 B
Go
package wsapi
|
|
|
|
// roomCount reports live rooms, so a test can assert that a room was evicted.
|
|
// Nothing in the server depends on it.
|
|
func (h *hub) roomCount() int {
|
|
h.mu.Lock()
|
|
defer h.mu.Unlock()
|
|
return len(h.rooms)
|
|
}
|