From c22abecccb01d03d01b0829f35ead627c5b42a13 Mon Sep 17 00:00:00 2001 From: Eng Zer Jun Date: Mon, 3 Mar 2025 21:23:45 +0800 Subject: [PATCH] refactor: replace `golang.org/x/exp/slices` with `slices` The experimental functions in `golang.org/x/exp/slices` are now available in the standard library in Go 1.21. Reference: https://go.dev/doc/go1.21#slices Signed-off-by: Eng Zer Jun --- agent/agent.go | 2 +- agent/agent_test.go | 2 +- agent/agentssh/agentssh.go | 2 +- agent/agenttest/client.go | 2 +- agent/reconnectingpty/buffered.go | 2 +- cli/configssh.go | 2 +- cli/create.go | 2 +- cli/exp_scaletest.go | 2 +- cli/root.go | 2 +- cli/tokens.go | 2 +- coderd/agentapi/lifecycle.go | 2 +- coderd/audit/audit.go | 2 +- coderd/database/db2sdk/db2sdk.go | 2 +- coderd/database/dbauthz/dbauthz.go | 2 +- coderd/database/dbmem/dbmem.go | 2 +- coderd/database/dbmetrics/dbmetrics.go | 2 +- coderd/database/dbmetrics/querymetrics.go | 2 +- coderd/database/dbpurge/dbpurge_test.go | 2 +- coderd/database/gentest/modelqueries_test.go | 2 +- coderd/database/migrations/migrate_test.go | 2 +- coderd/debug.go | 2 +- coderd/devtunnel/servers.go | 2 +- coderd/entitlements/entitlements.go | 2 +- coderd/healthcheck/database.go | 3 +-- coderd/healthcheck/derphealth/derp.go | 2 +- coderd/httpmw/apikey_test.go | 2 +- coderd/idpsync/group_test.go | 2 +- coderd/idpsync/role.go | 2 +- coderd/idpsync/role_test.go | 2 +- coderd/insights.go | 5 ++--- coderd/notifications_test.go | 2 +- coderd/prometheusmetrics/insights/metricscollector.go | 2 +- coderd/provisionerdserver/acquirer.go | 2 +- coderd/provisionerdserver/acquirer_test.go | 2 +- coderd/provisionerdserver/provisionerdserver.go | 2 +- coderd/userpassword/userpassword.go | 2 +- coderd/users_test.go | 2 +- coderd/workspaceagents.go | 2 +- coderd/workspaceapps/db.go | 2 +- coderd/workspaceapps/stats_test.go | 2 +- coderd/workspacebuilds.go | 2 +- coderd/workspacebuilds_test.go | 2 +- codersdk/agentsdk/logs_internal_test.go | 2 +- codersdk/agentsdk/logs_test.go | 2 +- codersdk/healthsdk/interfaces_internal_test.go | 2 +- codersdk/provisionerdaemons.go | 2 +- enterprise/coderd/license/license_test.go | 2 +- pty/ptytest/ptytest.go | 2 +- scaletest/workspacetraffic/run_test.go | 2 +- site/site.go | 2 +- tailnet/node.go | 2 +- tailnet/node_internal_test.go | 2 +- 52 files changed, 53 insertions(+), 55 deletions(-) diff --git a/agent/agent.go b/agent/agent.go index 40e5de7356d9c..c42bf3a815e18 100644 --- a/agent/agent.go +++ b/agent/agent.go @@ -14,6 +14,7 @@ import ( "os" "os/user" "path/filepath" + "slices" "sort" "strconv" "strings" @@ -26,7 +27,6 @@ import ( "github.com/prometheus/common/expfmt" "github.com/spf13/afero" "go.uber.org/atomic" - "golang.org/x/exp/slices" "golang.org/x/sync/errgroup" "golang.org/x/xerrors" "google.golang.org/protobuf/types/known/timestamppb" diff --git a/agent/agent_test.go b/agent/agent_test.go index 8466c4e0961b4..44112b6524fc9 100644 --- a/agent/agent_test.go +++ b/agent/agent_test.go @@ -19,6 +19,7 @@ import ( "path/filepath" "regexp" "runtime" + "slices" "strconv" "strings" "sync/atomic" @@ -41,7 +42,6 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" "golang.org/x/crypto/ssh" - "golang.org/x/exp/slices" "golang.org/x/xerrors" "cdr.dev/slog" diff --git a/agent/agentssh/agentssh.go b/agent/agentssh/agentssh.go index b1a1f32baf032..816bdf55556e9 100644 --- a/agent/agentssh/agentssh.go +++ b/agent/agentssh/agentssh.go @@ -12,6 +12,7 @@ import ( "os/user" "path/filepath" "runtime" + "slices" "strings" "sync" "time" @@ -24,7 +25,6 @@ import ( "github.com/spf13/afero" "go.uber.org/atomic" gossh "golang.org/x/crypto/ssh" - "golang.org/x/exp/slices" "golang.org/x/xerrors" "cdr.dev/slog" diff --git a/agent/agenttest/client.go b/agent/agenttest/client.go index b5fa6ea8c2189..a1d14e32a2c55 100644 --- a/agent/agenttest/client.go +++ b/agent/agenttest/client.go @@ -3,6 +3,7 @@ package agenttest import ( "context" "io" + "slices" "sync" "sync/atomic" "testing" @@ -12,7 +13,6 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" "golang.org/x/exp/maps" - "golang.org/x/exp/slices" "golang.org/x/xerrors" "google.golang.org/protobuf/types/known/durationpb" "google.golang.org/protobuf/types/known/emptypb" diff --git a/agent/reconnectingpty/buffered.go b/agent/reconnectingpty/buffered.go index 6f314333a725e..fb3c9907f4f8c 100644 --- a/agent/reconnectingpty/buffered.go +++ b/agent/reconnectingpty/buffered.go @@ -5,11 +5,11 @@ import ( "errors" "io" "net" + "slices" "time" "github.com/armon/circbuf" "github.com/prometheus/client_golang/prometheus" - "golang.org/x/exp/slices" "golang.org/x/xerrors" "cdr.dev/slog" diff --git a/cli/configssh.go b/cli/configssh.go index a7aed33eba1df..b3c29f711bdb6 100644 --- a/cli/configssh.go +++ b/cli/configssh.go @@ -11,6 +11,7 @@ import ( "os" "path/filepath" "runtime" + "slices" "strconv" "strings" @@ -19,7 +20,6 @@ import ( "github.com/pkg/diff" "github.com/pkg/diff/write" "golang.org/x/exp/constraints" - "golang.org/x/exp/slices" "golang.org/x/xerrors" "github.com/coder/coder/v2/cli/cliui" diff --git a/cli/create.go b/cli/create.go index f3709314cd2be..bb2e8dde0255a 100644 --- a/cli/create.go +++ b/cli/create.go @@ -4,11 +4,11 @@ import ( "context" "fmt" "io" + "slices" "strings" "time" "github.com/google/uuid" - "golang.org/x/exp/slices" "golang.org/x/xerrors" "github.com/coder/pretty" diff --git a/cli/exp_scaletest.go b/cli/exp_scaletest.go index a7bd0f396b5aa..a844a7e8c6258 100644 --- a/cli/exp_scaletest.go +++ b/cli/exp_scaletest.go @@ -12,6 +12,7 @@ import ( "net/url" "os" "os/signal" + "slices" "strconv" "strings" "sync" @@ -21,7 +22,6 @@ import ( "github.com/prometheus/client_golang/prometheus" "github.com/prometheus/client_golang/prometheus/promhttp" "go.opentelemetry.io/otel/trace" - "golang.org/x/exp/slices" "golang.org/x/xerrors" "cdr.dev/slog" diff --git a/cli/root.go b/cli/root.go index 09044ad3e28ca..816d7b769eb0d 100644 --- a/cli/root.go +++ b/cli/root.go @@ -17,6 +17,7 @@ import ( "path/filepath" "runtime" "runtime/trace" + "slices" "strings" "sync" "syscall" @@ -25,7 +26,6 @@ import ( "github.com/mattn/go-isatty" "github.com/mitchellh/go-wordwrap" - "golang.org/x/exp/slices" "golang.org/x/mod/semver" "golang.org/x/xerrors" diff --git a/cli/tokens.go b/cli/tokens.go index d132547576d32..7873882e3ae05 100644 --- a/cli/tokens.go +++ b/cli/tokens.go @@ -3,10 +3,10 @@ package cli import ( "fmt" "os" + "slices" "strings" "time" - "golang.org/x/exp/slices" "golang.org/x/xerrors" "github.com/coder/coder/v2/cli/cliui" diff --git a/coderd/agentapi/lifecycle.go b/coderd/agentapi/lifecycle.go index 5dd5e7b0c1b06..6bb3fedc5174c 100644 --- a/coderd/agentapi/lifecycle.go +++ b/coderd/agentapi/lifecycle.go @@ -3,10 +3,10 @@ package agentapi import ( "context" "database/sql" + "slices" "time" "github.com/google/uuid" - "golang.org/x/exp/slices" "golang.org/x/mod/semver" "golang.org/x/xerrors" "google.golang.org/protobuf/types/known/timestamppb" diff --git a/coderd/audit/audit.go b/coderd/audit/audit.go index 097b0c6f49588..a965c27a004c6 100644 --- a/coderd/audit/audit.go +++ b/coderd/audit/audit.go @@ -2,11 +2,11 @@ package audit import ( "context" + "slices" "sync" "testing" "github.com/google/uuid" - "golang.org/x/exp/slices" "github.com/coder/coder/v2/coderd/database" ) diff --git a/coderd/database/db2sdk/db2sdk.go b/coderd/database/db2sdk/db2sdk.go index 2249e0c9f32ec..53cd272b3235e 100644 --- a/coderd/database/db2sdk/db2sdk.go +++ b/coderd/database/db2sdk/db2sdk.go @@ -5,13 +5,13 @@ import ( "encoding/json" "fmt" "net/url" + "slices" "sort" "strconv" "strings" "time" "github.com/google/uuid" - "golang.org/x/exp/slices" "golang.org/x/xerrors" "tailscale.com/tailcfg" diff --git a/coderd/database/dbauthz/dbauthz.go b/coderd/database/dbauthz/dbauthz.go index a39ba8d4172f0..b09c629959392 100644 --- a/coderd/database/dbauthz/dbauthz.go +++ b/coderd/database/dbauthz/dbauthz.go @@ -5,13 +5,13 @@ import ( "database/sql" "encoding/json" "errors" + "slices" "strings" "sync/atomic" "testing" "time" "github.com/google/uuid" - "golang.org/x/exp/slices" "golang.org/x/xerrors" "github.com/open-policy-agent/opa/topdown" diff --git a/coderd/database/dbmem/dbmem.go b/coderd/database/dbmem/dbmem.go index 65d24bb3434c2..6db4382266e65 100644 --- a/coderd/database/dbmem/dbmem.go +++ b/coderd/database/dbmem/dbmem.go @@ -10,6 +10,7 @@ import ( "math" "reflect" "regexp" + "slices" "sort" "strings" "sync" @@ -19,7 +20,6 @@ import ( "github.com/lib/pq" "golang.org/x/exp/constraints" "golang.org/x/exp/maps" - "golang.org/x/exp/slices" "golang.org/x/xerrors" "github.com/coder/coder/v2/coderd/notifications/types" diff --git a/coderd/database/dbmetrics/dbmetrics.go b/coderd/database/dbmetrics/dbmetrics.go index b0309f9f2e2eb..fbf4a3cae6931 100644 --- a/coderd/database/dbmetrics/dbmetrics.go +++ b/coderd/database/dbmetrics/dbmetrics.go @@ -2,11 +2,11 @@ package dbmetrics import ( "context" + "slices" "strconv" "time" "github.com/prometheus/client_golang/prometheus" - "golang.org/x/exp/slices" "cdr.dev/slog" "github.com/coder/coder/v2/coderd/database" diff --git a/coderd/database/dbmetrics/querymetrics.go b/coderd/database/dbmetrics/querymetrics.go index d05ec5f5acdf9..3855db4382751 100644 --- a/coderd/database/dbmetrics/querymetrics.go +++ b/coderd/database/dbmetrics/querymetrics.go @@ -5,11 +5,11 @@ package dbmetrics import ( "context" + "slices" "time" "github.com/google/uuid" "github.com/prometheus/client_golang/prometheus" - "golang.org/x/exp/slices" "cdr.dev/slog" "github.com/coder/coder/v2/coderd/database" diff --git a/coderd/database/dbpurge/dbpurge_test.go b/coderd/database/dbpurge/dbpurge_test.go index 3b21b1076cceb..2422bcc91dcfa 100644 --- a/coderd/database/dbpurge/dbpurge_test.go +++ b/coderd/database/dbpurge/dbpurge_test.go @@ -7,6 +7,7 @@ import ( "database/sql" "encoding/json" "fmt" + "slices" "testing" "time" @@ -14,7 +15,6 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" "go.uber.org/goleak" - "golang.org/x/exp/slices" "cdr.dev/slog" "cdr.dev/slog/sloggers/slogtest" diff --git a/coderd/database/gentest/modelqueries_test.go b/coderd/database/gentest/modelqueries_test.go index 52a99b54405ec..1025aaf324002 100644 --- a/coderd/database/gentest/modelqueries_test.go +++ b/coderd/database/gentest/modelqueries_test.go @@ -5,11 +5,11 @@ import ( "go/ast" "go/parser" "go/token" + "slices" "testing" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "golang.org/x/exp/slices" ) // TestCustomQueriesSynced makes sure the manual custom queries in modelqueries.go diff --git a/coderd/database/migrations/migrate_test.go b/coderd/database/migrations/migrate_test.go index bd347af0be1ea..62e301a422e55 100644 --- a/coderd/database/migrations/migrate_test.go +++ b/coderd/database/migrations/migrate_test.go @@ -6,6 +6,7 @@ import ( "fmt" "os" "path/filepath" + "slices" "sync" "testing" @@ -17,7 +18,6 @@ import ( "github.com/lib/pq" "github.com/stretchr/testify/require" "go.uber.org/goleak" - "golang.org/x/exp/slices" "golang.org/x/sync/errgroup" "github.com/coder/coder/v2/coderd/database/dbtestutil" diff --git a/coderd/debug.go b/coderd/debug.go index a34e211ef00b9..0ae62282a22d8 100644 --- a/coderd/debug.go +++ b/coderd/debug.go @@ -7,10 +7,10 @@ import ( "encoding/json" "fmt" "net/http" + "slices" "time" "github.com/google/uuid" - "golang.org/x/exp/slices" "golang.org/x/xerrors" "cdr.dev/slog" diff --git a/coderd/devtunnel/servers.go b/coderd/devtunnel/servers.go index 498ba74e42017..79be97db875ef 100644 --- a/coderd/devtunnel/servers.go +++ b/coderd/devtunnel/servers.go @@ -2,11 +2,11 @@ package devtunnel import ( "runtime" + "slices" "sync" "time" ping "github.com/prometheus-community/pro-bing" - "golang.org/x/exp/slices" "golang.org/x/sync/errgroup" "golang.org/x/xerrors" diff --git a/coderd/entitlements/entitlements.go b/coderd/entitlements/entitlements.go index e141a861a9045..6bbe32ade4a1b 100644 --- a/coderd/entitlements/entitlements.go +++ b/coderd/entitlements/entitlements.go @@ -4,10 +4,10 @@ import ( "context" "encoding/json" "net/http" + "slices" "sync" "time" - "golang.org/x/exp/slices" "golang.org/x/xerrors" "github.com/coder/coder/v2/codersdk" diff --git a/coderd/healthcheck/database.go b/coderd/healthcheck/database.go index 275124c5b1808..97b4783231acc 100644 --- a/coderd/healthcheck/database.go +++ b/coderd/healthcheck/database.go @@ -2,10 +2,9 @@ package healthcheck import ( "context" + "slices" "time" - "golang.org/x/exp/slices" - "github.com/coder/coder/v2/coderd/database" "github.com/coder/coder/v2/coderd/healthcheck/health" "github.com/coder/coder/v2/codersdk/healthsdk" diff --git a/coderd/healthcheck/derphealth/derp.go b/coderd/healthcheck/derphealth/derp.go index f74db243cbc18..fa24ebe7574c6 100644 --- a/coderd/healthcheck/derphealth/derp.go +++ b/coderd/healthcheck/derphealth/derp.go @@ -6,12 +6,12 @@ import ( "net" "net/netip" "net/url" + "slices" "strings" "sync" "sync/atomic" "time" - "golang.org/x/exp/slices" "golang.org/x/xerrors" "tailscale.com/derp" "tailscale.com/derp/derphttp" diff --git a/coderd/httpmw/apikey_test.go b/coderd/httpmw/apikey_test.go index c2e69eb7ae686..bd979e88235ad 100644 --- a/coderd/httpmw/apikey_test.go +++ b/coderd/httpmw/apikey_test.go @@ -9,6 +9,7 @@ import ( "net" "net/http" "net/http/httptest" + "slices" "strings" "sync/atomic" "testing" @@ -17,7 +18,6 @@ import ( "github.com/google/uuid" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "golang.org/x/exp/slices" "golang.org/x/oauth2" "github.com/coder/coder/v2/coderd/database" diff --git a/coderd/idpsync/group_test.go b/coderd/idpsync/group_test.go index 2baafd53ff03c..7fbfd3bfe4250 100644 --- a/coderd/idpsync/group_test.go +++ b/coderd/idpsync/group_test.go @@ -4,12 +4,12 @@ import ( "context" "database/sql" "regexp" + "slices" "testing" "github.com/golang-jwt/jwt/v4" "github.com/google/uuid" "github.com/stretchr/testify/require" - "golang.org/x/exp/slices" "golang.org/x/xerrors" "cdr.dev/slog/sloggers/slogtest" diff --git a/coderd/idpsync/role.go b/coderd/idpsync/role.go index 5cb0ac172581c..22e0edc3bc662 100644 --- a/coderd/idpsync/role.go +++ b/coderd/idpsync/role.go @@ -3,10 +3,10 @@ package idpsync import ( "context" "encoding/json" + "slices" "github.com/golang-jwt/jwt/v4" "github.com/google/uuid" - "golang.org/x/exp/slices" "golang.org/x/xerrors" "cdr.dev/slog" diff --git a/coderd/idpsync/role_test.go b/coderd/idpsync/role_test.go index 45e9edd6c1dd4..7d686442144b1 100644 --- a/coderd/idpsync/role_test.go +++ b/coderd/idpsync/role_test.go @@ -3,13 +3,13 @@ package idpsync_test import ( "context" "encoding/json" + "slices" "testing" "github.com/golang-jwt/jwt/v4" "github.com/google/uuid" "github.com/stretchr/testify/require" "go.uber.org/mock/gomock" - "golang.org/x/exp/slices" "cdr.dev/slog/sloggers/slogtest" "github.com/coder/coder/v2/coderd/database" diff --git a/coderd/insights.go b/coderd/insights.go index 9c9fdcfa3c200..9f2bbf5d8b463 100644 --- a/coderd/insights.go +++ b/coderd/insights.go @@ -5,18 +5,17 @@ import ( "database/sql" "fmt" "net/http" + "slices" "strings" "time" - "github.com/coder/coder/v2/coderd/database/dbtime" - "github.com/google/uuid" - "golang.org/x/exp/slices" "golang.org/x/sync/errgroup" "golang.org/x/xerrors" "github.com/coder/coder/v2/coderd/database" "github.com/coder/coder/v2/coderd/database/db2sdk" + "github.com/coder/coder/v2/coderd/database/dbtime" "github.com/coder/coder/v2/coderd/httpapi" "github.com/coder/coder/v2/coderd/rbac" "github.com/coder/coder/v2/coderd/rbac/policy" diff --git a/coderd/notifications_test.go b/coderd/notifications_test.go index 2e8d851522744..d50464869298b 100644 --- a/coderd/notifications_test.go +++ b/coderd/notifications_test.go @@ -2,10 +2,10 @@ package coderd_test import ( "net/http" + "slices" "testing" "github.com/stretchr/testify/require" - "golang.org/x/exp/slices" "github.com/coder/serpent" diff --git a/coderd/prometheusmetrics/insights/metricscollector.go b/coderd/prometheusmetrics/insights/metricscollector.go index 7dcf6025f2fa2..f7ecb06e962f0 100644 --- a/coderd/prometheusmetrics/insights/metricscollector.go +++ b/coderd/prometheusmetrics/insights/metricscollector.go @@ -2,12 +2,12 @@ package insights import ( "context" + "slices" "sync/atomic" "time" "github.com/google/uuid" "github.com/prometheus/client_golang/prometheus" - "golang.org/x/exp/slices" "golang.org/x/sync/errgroup" "golang.org/x/xerrors" diff --git a/coderd/provisionerdserver/acquirer.go b/coderd/provisionerdserver/acquirer.go index 4c2fe6b1d49a9..a655edebfdd98 100644 --- a/coderd/provisionerdserver/acquirer.go +++ b/coderd/provisionerdserver/acquirer.go @@ -4,13 +4,13 @@ import ( "context" "database/sql" "encoding/json" + "slices" "strings" "sync" "time" "github.com/cenkalti/backoff/v4" "github.com/google/uuid" - "golang.org/x/exp/slices" "golang.org/x/xerrors" "cdr.dev/slog" diff --git a/coderd/provisionerdserver/acquirer_test.go b/coderd/provisionerdserver/acquirer_test.go index 6e4d6a4ff7e03..22794c72657cc 100644 --- a/coderd/provisionerdserver/acquirer_test.go +++ b/coderd/provisionerdserver/acquirer_test.go @@ -5,6 +5,7 @@ import ( "database/sql" "encoding/json" "fmt" + "slices" "strings" "sync" "testing" @@ -15,7 +16,6 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" "go.uber.org/goleak" - "golang.org/x/exp/slices" "github.com/coder/coder/v2/coderd/database" "github.com/coder/coder/v2/coderd/database/dbmem" diff --git a/coderd/provisionerdserver/provisionerdserver.go b/coderd/provisionerdserver/provisionerdserver.go index 3c9650ffc82e0..3c82a41d9323d 100644 --- a/coderd/provisionerdserver/provisionerdserver.go +++ b/coderd/provisionerdserver/provisionerdserver.go @@ -9,6 +9,7 @@ import ( "net/http" "net/url" "reflect" + "slices" "sort" "strconv" "strings" @@ -20,7 +21,6 @@ import ( semconv "go.opentelemetry.io/otel/semconv/v1.14.0" "go.opentelemetry.io/otel/trace" "golang.org/x/exp/maps" - "golang.org/x/exp/slices" "golang.org/x/oauth2" "golang.org/x/xerrors" protobuf "google.golang.org/protobuf/proto" diff --git a/coderd/userpassword/userpassword.go b/coderd/userpassword/userpassword.go index fa16a2c89edf4..2fb01a76d258f 100644 --- a/coderd/userpassword/userpassword.go +++ b/coderd/userpassword/userpassword.go @@ -7,12 +7,12 @@ import ( "encoding/base64" "fmt" "os" + "slices" "strconv" "strings" passwordvalidator "github.com/wagslane/go-password-validator" "golang.org/x/crypto/pbkdf2" - "golang.org/x/exp/slices" "golang.org/x/xerrors" "github.com/coder/coder/v2/coderd/util/lazy" diff --git a/coderd/users_test.go b/coderd/users_test.go index 74c27da7ef6f5..2d85a9823a587 100644 --- a/coderd/users_test.go +++ b/coderd/users_test.go @@ -4,6 +4,7 @@ import ( "context" "fmt" "net/http" + "slices" "strings" "testing" "time" @@ -19,7 +20,6 @@ import ( "github.com/google/uuid" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "golang.org/x/exp/slices" "golang.org/x/sync/errgroup" "golang.org/x/xerrors" diff --git a/coderd/workspaceagents.go b/coderd/workspaceagents.go index ddfb21a751671..ff16735af9aea 100644 --- a/coderd/workspaceagents.go +++ b/coderd/workspaceagents.go @@ -9,6 +9,7 @@ import ( "io" "net/http" "net/url" + "slices" "sort" "strconv" "strings" @@ -17,7 +18,6 @@ import ( "github.com/google/uuid" "github.com/sqlc-dev/pqtype" "golang.org/x/exp/maps" - "golang.org/x/exp/slices" "golang.org/x/sync/errgroup" "golang.org/x/xerrors" "tailscale.com/tailcfg" diff --git a/coderd/workspaceapps/db.go b/coderd/workspaceapps/db.go index 1aa4dfe91bdd0..602983959948d 100644 --- a/coderd/workspaceapps/db.go +++ b/coderd/workspaceapps/db.go @@ -7,10 +7,10 @@ import ( "net/http" "net/url" "path" + "slices" "strings" "time" - "golang.org/x/exp/slices" "golang.org/x/xerrors" "github.com/go-jose/go-jose/v4/jwt" diff --git a/coderd/workspaceapps/stats_test.go b/coderd/workspaceapps/stats_test.go index c2c722929ea83..51a6d9eebf169 100644 --- a/coderd/workspaceapps/stats_test.go +++ b/coderd/workspaceapps/stats_test.go @@ -2,6 +2,7 @@ package workspaceapps_test import ( "context" + "slices" "sync" "sync/atomic" "testing" @@ -10,7 +11,6 @@ import ( "github.com/google/uuid" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "golang.org/x/exp/slices" "golang.org/x/xerrors" "github.com/coder/coder/v2/coderd/database/dbtime" diff --git a/coderd/workspacebuilds.go b/coderd/workspacebuilds.go index 76166bfcb6164..735d6025dd16f 100644 --- a/coderd/workspacebuilds.go +++ b/coderd/workspacebuilds.go @@ -7,13 +7,13 @@ import ( "fmt" "math" "net/http" + "slices" "sort" "strconv" "time" "github.com/go-chi/chi/v5" "github.com/google/uuid" - "golang.org/x/exp/slices" "golang.org/x/sync/errgroup" "golang.org/x/xerrors" diff --git a/coderd/workspacebuilds_test.go b/coderd/workspacebuilds_test.go index f6bfcfd2ead28..84efaa7ed0e23 100644 --- a/coderd/workspacebuilds_test.go +++ b/coderd/workspacebuilds_test.go @@ -5,6 +5,7 @@ import ( "errors" "fmt" "net/http" + "slices" "strconv" "testing" "time" @@ -14,7 +15,6 @@ import ( "github.com/stretchr/testify/require" "go.opentelemetry.io/otel" "go.opentelemetry.io/otel/propagation" - "golang.org/x/exp/slices" "golang.org/x/xerrors" "cdr.dev/slog" diff --git a/codersdk/agentsdk/logs_internal_test.go b/codersdk/agentsdk/logs_internal_test.go index 48149b83c497d..6333ffa19fbf5 100644 --- a/codersdk/agentsdk/logs_internal_test.go +++ b/codersdk/agentsdk/logs_internal_test.go @@ -2,12 +2,12 @@ package agentsdk import ( "context" + "slices" "testing" "time" "github.com/google/uuid" "github.com/stretchr/testify/require" - "golang.org/x/exp/slices" "golang.org/x/xerrors" protobuf "google.golang.org/protobuf/proto" diff --git a/codersdk/agentsdk/logs_test.go b/codersdk/agentsdk/logs_test.go index bb4948cb90dff..2b3b934c8db3c 100644 --- a/codersdk/agentsdk/logs_test.go +++ b/codersdk/agentsdk/logs_test.go @@ -4,13 +4,13 @@ import ( "context" "fmt" "net/http" + "slices" "testing" "time" "github.com/google/uuid" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "golang.org/x/exp/slices" "github.com/coder/coder/v2/codersdk" "github.com/coder/coder/v2/codersdk/agentsdk" diff --git a/codersdk/healthsdk/interfaces_internal_test.go b/codersdk/healthsdk/interfaces_internal_test.go index 2996c6e1f09e3..f870e543166e1 100644 --- a/codersdk/healthsdk/interfaces_internal_test.go +++ b/codersdk/healthsdk/interfaces_internal_test.go @@ -3,11 +3,11 @@ package healthsdk import ( "net" "net/netip" + "slices" "strings" "testing" "github.com/stretchr/testify/require" - "golang.org/x/exp/slices" "tailscale.com/net/interfaces" "github.com/coder/coder/v2/coderd/healthcheck/health" diff --git a/codersdk/provisionerdaemons.go b/codersdk/provisionerdaemons.go index 2a9472f1cb36a..014a68bbce72e 100644 --- a/codersdk/provisionerdaemons.go +++ b/codersdk/provisionerdaemons.go @@ -7,13 +7,13 @@ import ( "io" "net/http" "net/http/cookiejar" + "slices" "strings" "time" "github.com/google/uuid" "github.com/hashicorp/yamux" "golang.org/x/exp/maps" - "golang.org/x/exp/slices" "golang.org/x/xerrors" "github.com/coder/coder/v2/buildinfo" diff --git a/enterprise/coderd/license/license_test.go b/enterprise/coderd/license/license_test.go index ad7fc68f58600..b8b25b9535a2f 100644 --- a/enterprise/coderd/license/license_test.go +++ b/enterprise/coderd/license/license_test.go @@ -3,13 +3,13 @@ package license_test import ( "context" "fmt" + "slices" "testing" "time" "github.com/google/uuid" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "golang.org/x/exp/slices" "github.com/coder/coder/v2/coderd/database" "github.com/coder/coder/v2/coderd/database/dbmem" diff --git a/pty/ptytest/ptytest.go b/pty/ptytest/ptytest.go index a871a0ddcafa0..3c86970ec0006 100644 --- a/pty/ptytest/ptytest.go +++ b/pty/ptytest/ptytest.go @@ -8,6 +8,7 @@ import ( "io" "regexp" "runtime" + "slices" "strings" "sync" "testing" @@ -16,7 +17,6 @@ import ( "github.com/acarl005/stripansi" "github.com/stretchr/testify/require" - "golang.org/x/exp/slices" "golang.org/x/xerrors" "github.com/coder/coder/v2/pty" diff --git a/scaletest/workspacetraffic/run_test.go b/scaletest/workspacetraffic/run_test.go index 980e0d62ed21b..fe3fd389df082 100644 --- a/scaletest/workspacetraffic/run_test.go +++ b/scaletest/workspacetraffic/run_test.go @@ -7,6 +7,7 @@ import ( "net/http" "net/http/httptest" "runtime" + "slices" "strings" "sync" "testing" @@ -15,7 +16,6 @@ import ( "github.com/google/uuid" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "golang.org/x/exp/slices" "github.com/coder/coder/v2/agent/agenttest" "github.com/coder/coder/v2/coderd/coderdtest" diff --git a/site/site.go b/site/site.go index e2209b4052929..e0e9a1328508b 100644 --- a/site/site.go +++ b/site/site.go @@ -19,6 +19,7 @@ import ( "os" "path" "path/filepath" + "slices" "strings" "sync" "sync/atomic" @@ -29,7 +30,6 @@ import ( "github.com/justinas/nosurf" "github.com/klauspost/compress/zstd" "github.com/unrolled/secure" - "golang.org/x/exp/slices" "golang.org/x/sync/errgroup" "golang.org/x/sync/singleflight" "golang.org/x/xerrors" diff --git a/tailnet/node.go b/tailnet/node.go index 858af3ad71e24..1077a7d69c44c 100644 --- a/tailnet/node.go +++ b/tailnet/node.go @@ -3,11 +3,11 @@ package tailnet import ( "context" "net/netip" + "slices" "sync" "time" "golang.org/x/exp/maps" - "golang.org/x/exp/slices" "tailscale.com/tailcfg" "tailscale.com/types/key" "tailscale.com/wgengine" diff --git a/tailnet/node_internal_test.go b/tailnet/node_internal_test.go index 7a2222536620c..0c04a668090d3 100644 --- a/tailnet/node_internal_test.go +++ b/tailnet/node_internal_test.go @@ -2,13 +2,13 @@ package tailnet import ( "net/netip" + "slices" "testing" "time" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" "golang.org/x/exp/maps" - "golang.org/x/exp/slices" "golang.org/x/xerrors" "tailscale.com/tailcfg" "tailscale.com/types/key" pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy