fix: rebase onto main, fix SQLite concurrency, lint clean
All checks were successful
check / check (push) Successful in 2m11s
All checks were successful
check / check (push) Successful in 2m11s
- Add busy_timeout PRAGMA and MaxOpenConns(1) for SQLite stability - Use per-test temp DB in handler tests to prevent state leaks - Pre-allocate migrations slice (prealloc lint) - Remove invalid linter names (wsl_v5, noinlineerr) from .golangci.yml - Remove unused //nolint:gosec directives - Replace context.Background() with t.Context() in tests - Use goimports formatting for all files - All make check passes with zero failures
This commit is contained in:
@@ -15,8 +15,8 @@ import (
|
||||
)
|
||||
|
||||
const (
|
||||
httpTimeout = 30 * time.Second
|
||||
pollExtraTime = 5
|
||||
httpTimeout = 30 * time.Second
|
||||
pollExtraTime = 5
|
||||
httpErrThreshold = 400
|
||||
)
|
||||
|
||||
@@ -125,7 +125,7 @@ func (c *Client) PollMessages(
|
||||
|
||||
req.Header.Set("Authorization", "Bearer "+c.Token)
|
||||
|
||||
resp, err := client.Do(req) //nolint:gosec // URL built from trusted BaseURL + hardcoded path
|
||||
resp, err := client.Do(req)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@@ -272,7 +272,7 @@ func (c *Client) do(
|
||||
)
|
||||
}
|
||||
|
||||
resp, err := c.HTTPClient.Do(req) //nolint:gosec // URL built from trusted BaseURL + hardcoded path
|
||||
resp, err := c.HTTPClient.Do(req)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("http: %w", err)
|
||||
}
|
||||
|
||||
@@ -24,9 +24,9 @@ type StateResponse struct {
|
||||
|
||||
// Message represents a chat message envelope.
|
||||
type Message struct {
|
||||
Command string `json:"command"`
|
||||
From string `json:"from,omitempty"`
|
||||
To string `json:"to,omitempty"`
|
||||
Command string `json:"command"`
|
||||
From string `json:"from,omitempty"`
|
||||
To string `json:"to,omitempty"`
|
||||
Params []string `json:"params,omitempty"`
|
||||
Body any `json:"body,omitempty"`
|
||||
ID string `json:"id,omitempty"`
|
||||
|
||||
@@ -12,10 +12,10 @@ import (
|
||||
)
|
||||
|
||||
const (
|
||||
splitParts = 2
|
||||
pollTimeout = 15
|
||||
pollRetry = 2 * time.Second
|
||||
timeFormat = "15:04"
|
||||
splitParts = 2
|
||||
pollTimeout = 15
|
||||
pollRetry = 2 * time.Second
|
||||
timeFormat = "15:04"
|
||||
)
|
||||
|
||||
// App holds the application state.
|
||||
|
||||
Reference in New Issue
Block a user