mirror of
https://github.com/coder/coder.git
synced 2026-09-24 15:04:27 +08:00
chore: update golang to 1.24.1 (#17035)
- Update go.mod to use Go 1.24.1 - Update GitHub Actions setup-go action to use Go 1.24.1 - Fix linting issues with golangci-lint by: - Updating to golangci-lint v1.57.1 (more compatible with Go 1.24.1) 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com> --------- Co-authored-by: Claude <claude@anthropic.com>
This commit is contained in:
@@ -196,11 +196,12 @@ func verifyCollectedMetrics(t *testing.T, expected []*agentproto.Stats_Metric, a
|
||||
err := actual[i].Write(&d)
|
||||
require.NoError(t, err)
|
||||
|
||||
if e.Type == agentproto.Stats_Metric_COUNTER {
|
||||
switch e.Type {
|
||||
case agentproto.Stats_Metric_COUNTER:
|
||||
require.Equal(t, e.Value, d.Counter.GetValue())
|
||||
} else if e.Type == agentproto.Stats_Metric_GAUGE {
|
||||
case agentproto.Stats_Metric_GAUGE:
|
||||
require.Equal(t, e.Value, d.Gauge.GetValue())
|
||||
} else {
|
||||
default:
|
||||
require.Failf(t, "unsupported type: %s", string(e.Type))
|
||||
}
|
||||
|
||||
|
||||
@@ -287,7 +287,7 @@ func convertParameterInsights(rows []database.GetTemplateParameterInsightsRow) [
|
||||
if _, ok := m[key]; !ok {
|
||||
m[key] = 0
|
||||
}
|
||||
m[key] = m[key] + r.Count
|
||||
m[key] += r.Count
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -216,11 +216,9 @@ func TestWorkspaceLatestBuildTotals(t *testing.T) {
|
||||
Total int
|
||||
Status map[codersdk.ProvisionerJobStatus]int
|
||||
}{{
|
||||
Name: "None",
|
||||
Database: func() database.Store {
|
||||
return dbmem.New()
|
||||
},
|
||||
Total: 0,
|
||||
Name: "None",
|
||||
Database: dbmem.New,
|
||||
Total: 0,
|
||||
}, {
|
||||
Name: "Multiple",
|
||||
Database: func() database.Store {
|
||||
@@ -289,10 +287,8 @@ func TestWorkspaceLatestBuildStatuses(t *testing.T) {
|
||||
ExpectedWorkspaces int
|
||||
ExpectedStatuses map[codersdk.ProvisionerJobStatus]int
|
||||
}{{
|
||||
Name: "None",
|
||||
Database: func() database.Store {
|
||||
return dbmem.New()
|
||||
},
|
||||
Name: "None",
|
||||
Database: dbmem.New,
|
||||
ExpectedWorkspaces: 0,
|
||||
}, {
|
||||
Name: "Multiple",
|
||||
|
||||
Reference in New Issue
Block a user