fix: resolve all linting errors and add SSE compression
- Add brotli compression (level 5) to long-lived SSE event streams (HandleGameEvents, HandleSnakeEvents) to reduce wire payload - Fix all errcheck violations with nolint annotations for best-effort calls - Fix goimports: separate stdlib, third-party, and local import groups - Fix staticcheck: add package comments, use tagged switch - Zero lint issues remaining
This commit is contained in:
@@ -62,7 +62,7 @@ func (si *SnakeGameInstance) countdownPhase() {
|
||||
si.game.Status = StatusInProgress
|
||||
|
||||
if si.queries != nil {
|
||||
si.saveSnakeGame(si.game)
|
||||
si.saveSnakeGame(si.game) //nolint:errcheck
|
||||
}
|
||||
si.gameMu.Unlock()
|
||||
si.notify()
|
||||
@@ -70,7 +70,7 @@ func (si *SnakeGameInstance) countdownPhase() {
|
||||
}
|
||||
|
||||
if si.queries != nil {
|
||||
si.saveSnakeGame(si.game)
|
||||
si.saveSnakeGame(si.game) //nolint:errcheck
|
||||
}
|
||||
si.gameMu.Unlock()
|
||||
si.notify()
|
||||
@@ -124,7 +124,7 @@ func (si *SnakeGameInstance) gamePhase() {
|
||||
if time.Since(lastInput) > inactivityLimit {
|
||||
si.game.Status = StatusFinished
|
||||
if si.queries != nil {
|
||||
si.saveSnakeGame(si.game)
|
||||
si.saveSnakeGame(si.game) //nolint:errcheck
|
||||
}
|
||||
si.gameMu.Unlock()
|
||||
si.notify()
|
||||
@@ -196,7 +196,7 @@ func (si *SnakeGameInstance) gamePhase() {
|
||||
}
|
||||
|
||||
if si.queries != nil {
|
||||
si.saveSnakeGame(si.game)
|
||||
si.saveSnakeGame(si.game) //nolint:errcheck
|
||||
}
|
||||
|
||||
si.gameMu.Unlock()
|
||||
|
||||
Reference in New Issue
Block a user