diff --git a/.semgrep/imports.yml b/.semgrep/imports.yml index 3afb901dd..9fe2e9ad6 100644 --- a/.semgrep/imports.yml +++ b/.semgrep/imports.yml @@ -9,6 +9,8 @@ rules: - pattern: '"github.com/hashicorp/consul"' - pattern: '"github.com/hashicorp/consul/command/flags"' - pattern: '"github.com/hashicorp/consul/sdk"' + - pattern: '"golang.org/x/exp/slices"' + - pattern: '"golang.org/x/exp/maps"' message: "Import of this package has been disallowed" languages: - "generic" diff --git a/api/error_unexpected_response.go b/api/error_unexpected_response.go index b843fc7ab..611ca33a4 100644 --- a/api/error_unexpected_response.go +++ b/api/error_unexpected_response.go @@ -8,10 +8,9 @@ import ( "fmt" "io" "net/http" + "slices" "strings" "time" - - "golang.org/x/exp/slices" ) // UnexpectedResponseError tracks the components for API errors encountered when diff --git a/client/allocrunner/taskrunner/getter/params.go b/client/allocrunner/taskrunner/getter/params.go index 3e8b6aed7..1daf30093 100644 --- a/client/allocrunner/taskrunner/getter/params.go +++ b/client/allocrunner/taskrunner/getter/params.go @@ -8,13 +8,13 @@ import ( "encoding/json" "io" "io/fs" + "maps" + "slices" "strings" "time" "github.com/hashicorp/go-cleanhttp" "github.com/hashicorp/go-getter" - "golang.org/x/exp/maps" - "golang.org/x/exp/slices" ) // parameters is encoded by the Nomad client and decoded by the getter sub-process diff --git a/client/allocrunner/taskrunner/task_runner.go b/client/allocrunner/taskrunner/task_runner.go index b84dda9cb..0d9d6e94d 100644 --- a/client/allocrunner/taskrunner/task_runner.go +++ b/client/allocrunner/taskrunner/task_runner.go @@ -7,6 +7,7 @@ import ( "context" "errors" "fmt" + "slices" "strings" "sync" "time" @@ -40,7 +41,6 @@ import ( "github.com/hashicorp/nomad/nomad/structs" bstructs "github.com/hashicorp/nomad/plugins/base/structs" "github.com/hashicorp/nomad/plugins/drivers" - "golang.org/x/exp/slices" ) const ( diff --git a/client/config/config.go b/client/config/config.go index 27e1dae15..05604c148 100644 --- a/client/config/config.go +++ b/client/config/config.go @@ -7,8 +7,10 @@ import ( "context" "errors" "fmt" + "maps" "net" "reflect" + "slices" "strconv" "strings" "time" @@ -27,8 +29,6 @@ import ( structsc "github.com/hashicorp/nomad/nomad/structs/config" "github.com/hashicorp/nomad/plugins/base" "github.com/hashicorp/nomad/version" - "golang.org/x/exp/maps" - "golang.org/x/exp/slices" ) var ( diff --git a/client/lib/idset/idset.go b/client/lib/idset/idset.go index 2b58e54d8..73bf3da26 100644 --- a/client/lib/idset/idset.go +++ b/client/lib/idset/idset.go @@ -8,11 +8,11 @@ package idset import ( "fmt" "regexp" + "slices" "strconv" "strings" "github.com/hashicorp/go-set" - "golang.org/x/exp/slices" ) // An ID is representative of a non-negative identifier of something like diff --git a/client/serviceregistration/checks/checkstore/shim.go b/client/serviceregistration/checks/checkstore/shim.go index 2c8b8a420..142e45414 100644 --- a/client/serviceregistration/checks/checkstore/shim.go +++ b/client/serviceregistration/checks/checkstore/shim.go @@ -4,14 +4,14 @@ package checkstore import ( + "maps" + "slices" "sync" "github.com/hashicorp/go-hclog" "github.com/hashicorp/nomad/client/serviceregistration/checks" "github.com/hashicorp/nomad/client/state" "github.com/hashicorp/nomad/nomad/structs" - "golang.org/x/exp/maps" - "golang.org/x/exp/slices" ) // A Shim is used to track the latest check status information, one layer above diff --git a/client/serviceregistration/checks/checkstore/shim_test.go b/client/serviceregistration/checks/checkstore/shim_test.go index a651e6961..bbfd0ff02 100644 --- a/client/serviceregistration/checks/checkstore/shim_test.go +++ b/client/serviceregistration/checks/checkstore/shim_test.go @@ -4,6 +4,7 @@ package checkstore import ( + "slices" "testing" "github.com/hashicorp/nomad/ci" @@ -13,7 +14,6 @@ import ( "github.com/hashicorp/nomad/helper/uuid" "github.com/hashicorp/nomad/nomad/structs" "github.com/shoenig/test/must" - "golang.org/x/exp/slices" ) var ( diff --git a/command/acl_auth_method_create.go b/command/acl_auth_method_create.go index 5af9e44d8..064acd904 100644 --- a/command/acl_auth_method_create.go +++ b/command/acl_auth_method_create.go @@ -7,13 +7,13 @@ import ( "encoding/json" "fmt" "io" + "slices" "strings" "time" "github.com/hashicorp/nomad/api" "github.com/mitchellh/cli" "github.com/posener/complete" - "golang.org/x/exp/slices" ) // Ensure ACLAuthMethodCreateCommand satisfies the cli.Command interface. diff --git a/command/acl_auth_method_update.go b/command/acl_auth_method_update.go index c2910ab87..5b7a78b58 100644 --- a/command/acl_auth_method_update.go +++ b/command/acl_auth_method_update.go @@ -8,13 +8,13 @@ import ( "flag" "fmt" "io" + "slices" "strings" "time" "github.com/hashicorp/nomad/api" "github.com/mitchellh/cli" "github.com/posener/complete" - "golang.org/x/exp/slices" ) // Ensure ACLAuthMethodUpdateCommand satisfies the cli.Command interface. diff --git a/command/agent/config.go b/command/agent/config.go index fbf83980a..ec7863edc 100644 --- a/command/agent/config.go +++ b/command/agent/config.go @@ -8,11 +8,13 @@ import ( "errors" "fmt" "io" + "maps" "net" "os" "os/exec" "path/filepath" "runtime" + "slices" "sort" "strconv" "strings" @@ -30,8 +32,6 @@ import ( "github.com/hashicorp/nomad/nomad/structs" "github.com/hashicorp/nomad/nomad/structs/config" "github.com/hashicorp/nomad/version" - "golang.org/x/exp/maps" - "golang.org/x/exp/slices" ) // Config is the configuration for the Nomad agent. diff --git a/command/agent/config_parse.go b/command/agent/config_parse.go index a00c8e568..eeda547d0 100644 --- a/command/agent/config_parse.go +++ b/command/agent/config_parse.go @@ -9,6 +9,7 @@ import ( "io" "os" "path/filepath" + "slices" "time" "github.com/hashicorp/hcl" @@ -17,7 +18,6 @@ import ( "github.com/hashicorp/nomad/helper" "github.com/hashicorp/nomad/nomad/structs/config" "github.com/mitchellh/mapstructure" - "golang.org/x/exp/slices" ) // ParseConfigFile returns an agent.Config from parsed from a file. diff --git a/command/agent/consul/catalog_testing.go b/command/agent/consul/catalog_testing.go index 43d78077e..1cca3facf 100644 --- a/command/agent/consul/catalog_testing.go +++ b/command/agent/consul/catalog_testing.go @@ -5,13 +5,13 @@ package consul import ( "fmt" + "maps" + "slices" "sort" "sync" "github.com/hashicorp/consul/api" "github.com/hashicorp/go-hclog" - "golang.org/x/exp/maps" - "golang.org/x/exp/slices" ) // MockNamespaces is a mock implementation of NamespaceAPI. diff --git a/command/agent/consul/connect.go b/command/agent/consul/connect.go index 521631c30..d76cbdcae 100644 --- a/command/agent/consul/connect.go +++ b/command/agent/consul/connect.go @@ -5,15 +5,15 @@ package consul import ( "fmt" + "maps" "net" + "slices" "sort" "strconv" "strings" "github.com/hashicorp/consul/api" "github.com/hashicorp/nomad/nomad/structs" - "golang.org/x/exp/maps" - "golang.org/x/exp/slices" ) // newConnect creates a new Consul AgentServiceConnect struct based on a Nomad diff --git a/command/agent/consul/service_client.go b/command/agent/consul/service_client.go index 0e1d5496e..f4f7eff98 100644 --- a/command/agent/consul/service_client.go +++ b/command/agent/consul/service_client.go @@ -6,10 +6,12 @@ package consul import ( "context" "fmt" + "maps" "net" "net/url" "reflect" "regexp" + "slices" "strconv" "strings" "sync" @@ -24,8 +26,6 @@ import ( "github.com/hashicorp/nomad/helper" "github.com/hashicorp/nomad/helper/envoy" "github.com/hashicorp/nomad/nomad/structs" - "golang.org/x/exp/maps" - "golang.org/x/exp/slices" ) const ( diff --git a/command/agent/job_endpoint.go b/command/agent/job_endpoint.go index 38cbae70b..4f04dfebf 100644 --- a/command/agent/job_endpoint.go +++ b/command/agent/job_endpoint.go @@ -5,7 +5,9 @@ package agent import ( "fmt" + "maps" "net/http" + "slices" "strconv" "strings" @@ -15,8 +17,6 @@ import ( "github.com/hashicorp/nomad/jobspec" "github.com/hashicorp/nomad/jobspec2" "github.com/hashicorp/nomad/nomad/structs" - "golang.org/x/exp/maps" - "golang.org/x/exp/slices" ) // jobNotFoundErr is an error string which can be used as the return string diff --git a/command/alloc_status.go b/command/alloc_status.go index 93a783c9a..1b15bc89a 100644 --- a/command/alloc_status.go +++ b/command/alloc_status.go @@ -6,17 +6,16 @@ package command import ( "fmt" "math" + "slices" "sort" "strconv" "strings" "time" "github.com/dustin/go-humanize" - "github.com/posener/complete" - "golang.org/x/exp/slices" - "github.com/hashicorp/nomad/api" "github.com/hashicorp/nomad/api/contexts" + "github.com/posener/complete" ) type AllocStatusCommand struct { diff --git a/command/operator_debug.go b/command/operator_debug.go index 9d86e889e..9dcef054b 100644 --- a/command/operator_debug.go +++ b/command/operator_debug.go @@ -14,10 +14,12 @@ import ( "fmt" "html/template" "io" + "maps" "net/http" "os" "os/signal" "path/filepath" + "slices" "strconv" "strings" "syscall" @@ -32,8 +34,6 @@ import ( "github.com/hashicorp/nomad/helper/escapingfs" "github.com/hashicorp/nomad/version" "github.com/posener/complete" - "golang.org/x/exp/maps" - "golang.org/x/exp/slices" ) type OperatorDebugCommand struct { diff --git a/command/var_put.go b/command/var_put.go index f7cc524ff..43f0ea969 100644 --- a/command/var_put.go +++ b/command/var_put.go @@ -11,6 +11,7 @@ import ( "os" "path/filepath" "regexp" + "slices" "strings" multierror "github.com/hashicorp/go-multierror" @@ -22,7 +23,6 @@ import ( "github.com/mitchellh/cli" "github.com/mitchellh/mapstructure" "github.com/posener/complete" - "golang.org/x/exp/slices" ) // Detect characters that are not valid identifiers to emit a warning when they diff --git a/drivers/docker/driver.go b/drivers/docker/driver.go index cf4dfb190..d2ac70150 100644 --- a/drivers/docker/driver.go +++ b/drivers/docker/driver.go @@ -12,6 +12,7 @@ import ( "os" "path/filepath" "runtime" + "slices" "strconv" "strings" "sync" @@ -39,7 +40,6 @@ import ( "github.com/hashicorp/nomad/plugins/drivers" pstructs "github.com/hashicorp/nomad/plugins/shared/structs" "github.com/ryanuber/go-glob" - "golang.org/x/exp/slices" ) var ( diff --git a/e2e/servicediscovery/service_discovery_test.go b/e2e/servicediscovery/service_discovery_test.go index 1b65075f3..22d364b65 100644 --- a/e2e/servicediscovery/service_discovery_test.go +++ b/e2e/servicediscovery/service_discovery_test.go @@ -6,6 +6,7 @@ package servicediscovery import ( "context" "reflect" + "slices" "strings" "testing" "time" @@ -14,7 +15,6 @@ import ( "github.com/hashicorp/nomad/e2e/e2eutil" "github.com/hashicorp/nomad/helper/uuid" "github.com/stretchr/testify/require" - "golang.org/x/exp/slices" ) const ( diff --git a/helper/funcs.go b/helper/funcs.go index 5094cbe84..a1216696e 100644 --- a/helper/funcs.go +++ b/helper/funcs.go @@ -6,11 +6,13 @@ package helper import ( "crypto/sha512" "fmt" + "maps" "math" "net/http" "path/filepath" "reflect" "regexp" + "slices" "strings" "sync" "time" @@ -18,8 +20,6 @@ import ( multierror "github.com/hashicorp/go-multierror" "github.com/hashicorp/go-set" "github.com/hashicorp/hcl/hcl/ast" - "golang.org/x/exp/maps" - "golang.org/x/exp/slices" ) // validUUID is used to check if a given string looks like a UUID diff --git a/jobspec2/parse_job.go b/jobspec2/parse_job.go index 44178d5f5..7520f40c5 100644 --- a/jobspec2/parse_job.go +++ b/jobspec2/parse_job.go @@ -4,11 +4,11 @@ package jobspec2 import ( + "slices" "time" "github.com/hashicorp/nomad/api" "github.com/hashicorp/nomad/helper/pointer" - "golang.org/x/exp/slices" ) func normalizeJob(jc *jobConfig) { diff --git a/lib/auth/jwt/validator.go b/lib/auth/jwt/validator.go index fa4fc7b34..b1ebaacf8 100644 --- a/lib/auth/jwt/validator.go +++ b/lib/auth/jwt/validator.go @@ -7,12 +7,11 @@ import ( "context" "crypto" "fmt" + "slices" "time" "github.com/armon/go-metrics" "github.com/hashicorp/cap/jwt" - "golang.org/x/exp/slices" - "github.com/hashicorp/nomad/helper" "github.com/hashicorp/nomad/nomad/structs" ) diff --git a/nomad/config.go b/nomad/config.go index 550b7bb13..315dde5a1 100644 --- a/nomad/config.go +++ b/nomad/config.go @@ -8,11 +8,10 @@ import ( "net" "os" "runtime" + "slices" "time" log "github.com/hashicorp/go-hclog" - "golang.org/x/exp/slices" - "github.com/hashicorp/memberlist" "github.com/hashicorp/nomad/helper" "github.com/hashicorp/nomad/helper/pointer" diff --git a/nomad/consul.go b/nomad/consul.go index a22ca5ef1..50bf42ef5 100644 --- a/nomad/consul.go +++ b/nomad/consul.go @@ -7,6 +7,7 @@ import ( "context" "errors" "fmt" + "slices" "strings" "sync" "time" @@ -17,7 +18,6 @@ import ( "github.com/hashicorp/nomad/command/agent/consul" "github.com/hashicorp/nomad/helper" "github.com/hashicorp/nomad/nomad/structs" - "golang.org/x/exp/slices" "golang.org/x/sync/errgroup" "golang.org/x/time/rate" ) diff --git a/nomad/job_endpoint_hook_connect.go b/nomad/job_endpoint_hook_connect.go index 5c4ad1dfc..bc257d4e1 100644 --- a/nomad/job_endpoint_hook_connect.go +++ b/nomad/job_endpoint_hook_connect.go @@ -7,6 +7,7 @@ import ( "errors" "fmt" "net" + "slices" "strconv" "strings" "time" @@ -17,7 +18,6 @@ import ( "github.com/hashicorp/nomad/helper/pointer" "github.com/hashicorp/nomad/helper/uuid" "github.com/hashicorp/nomad/nomad/structs" - "golang.org/x/exp/slices" ) const ( diff --git a/nomad/job_endpoint_hook_vault.go b/nomad/job_endpoint_hook_vault.go index 75bf62d0e..2fc7068d5 100644 --- a/nomad/job_endpoint_hook_vault.go +++ b/nomad/job_endpoint_hook_vault.go @@ -6,12 +6,12 @@ package nomad import ( "context" "fmt" + "slices" "strings" "github.com/hashicorp/nomad/helper" "github.com/hashicorp/nomad/nomad/structs" vapi "github.com/hashicorp/vault/api" - "golang.org/x/exp/slices" ) // jobVaultHook is an job registration admission controller for Vault blocks. diff --git a/nomad/license_config.go b/nomad/license_config.go index 3e8b3fe75..d211e8e5a 100644 --- a/nomad/license_config.go +++ b/nomad/license_config.go @@ -4,9 +4,8 @@ package nomad import ( + "slices" "time" - - "golang.org/x/exp/slices" ) // LicenseConfig allows for tunable licensing config diff --git a/nomad/search_endpoint_test.go b/nomad/search_endpoint_test.go index c001ca180..388046683 100644 --- a/nomad/search_endpoint_test.go +++ b/nomad/search_endpoint_test.go @@ -5,6 +5,7 @@ package nomad import ( "fmt" + "slices" "strconv" "strings" "testing" @@ -19,7 +20,6 @@ import ( "github.com/hashicorp/nomad/testutil" "github.com/shoenig/test/must" "github.com/stretchr/testify/require" - "golang.org/x/exp/slices" ) const jobIndex = 1000 diff --git a/nomad/state/state_store.go b/nomad/state/state_store.go index 9d00248ba..63db0b092 100644 --- a/nomad/state/state_store.go +++ b/nomad/state/state_store.go @@ -8,6 +8,7 @@ import ( "errors" "fmt" "reflect" + "slices" "sort" "strings" "time" @@ -22,7 +23,6 @@ import ( "github.com/hashicorp/nomad/lib/lang" "github.com/hashicorp/nomad/nomad/stream" "github.com/hashicorp/nomad/nomad/structs" - "golang.org/x/exp/slices" ) // Txn is a transaction against a state store. diff --git a/nomad/state/state_store_acl.go b/nomad/state/state_store_acl.go index 461a68f28..21d15246e 100644 --- a/nomad/state/state_store_acl.go +++ b/nomad/state/state_store_acl.go @@ -6,10 +6,10 @@ package state import ( "errors" "fmt" + "slices" "github.com/hashicorp/go-memdb" "github.com/hashicorp/nomad/nomad/structs" - "golang.org/x/exp/slices" ) // ACLTokensByExpired returns an array accessor IDs of expired ACL tokens. diff --git a/nomad/structs/acl.go b/nomad/structs/acl.go index 93c040a30..246f1f7d1 100644 --- a/nomad/structs/acl.go +++ b/nomad/structs/acl.go @@ -9,6 +9,7 @@ import ( "errors" "fmt" "regexp" + "slices" "strconv" "time" @@ -21,7 +22,6 @@ import ( "github.com/hashicorp/nomad/helper/uuid" "github.com/hashicorp/nomad/lib/lang" "golang.org/x/crypto/blake2b" - "golang.org/x/exp/slices" "oss.indeed.com/go/libtime" ) diff --git a/nomad/structs/bitmap.go b/nomad/structs/bitmap.go index 777c88094..1422c6cd0 100644 --- a/nomad/structs/bitmap.go +++ b/nomad/structs/bitmap.go @@ -5,8 +5,7 @@ package structs import ( "fmt" - - "golang.org/x/exp/slices" + "slices" ) // Bitmap is a simple uncompressed bitmap diff --git a/nomad/structs/config/audit.go b/nomad/structs/config/audit.go index c800136b6..56858d282 100644 --- a/nomad/structs/config/audit.go +++ b/nomad/structs/config/audit.go @@ -4,10 +4,10 @@ package config import ( + "slices" "time" "github.com/hashicorp/nomad/helper/pointer" - "golang.org/x/exp/slices" ) // AuditConfig is the configuration specific to Audit Logging diff --git a/nomad/structs/config/sentinel.go b/nomad/structs/config/sentinel.go index e82b3cc78..9553955c7 100644 --- a/nomad/structs/config/sentinel.go +++ b/nomad/structs/config/sentinel.go @@ -4,8 +4,9 @@ package config import ( + "slices" + "github.com/hashicorp/nomad/helper" - "golang.org/x/exp/slices" ) // SentinelConfig is configuration specific to Sentinel diff --git a/nomad/structs/config/ui.go b/nomad/structs/config/ui.go index a2c311d13..b201acfcc 100644 --- a/nomad/structs/config/ui.go +++ b/nomad/structs/config/ui.go @@ -5,9 +5,8 @@ package config import ( "fmt" + "slices" "strings" - - "golang.org/x/exp/slices" ) // UIConfig contains the operator configuration of the web UI diff --git a/nomad/structs/csi.go b/nomad/structs/csi.go index 4c936aeb6..b8140f026 100644 --- a/nomad/structs/csi.go +++ b/nomad/structs/csi.go @@ -6,13 +6,13 @@ package structs import ( "errors" "fmt" + "maps" + "slices" "strings" "time" multierror "github.com/hashicorp/go-multierror" "github.com/hashicorp/nomad/helper" - "golang.org/x/exp/maps" - "golang.org/x/exp/slices" ) // CSISocketName is the filename that Nomad expects plugins to create inside the diff --git a/nomad/structs/network.go b/nomad/structs/network.go index 4369fb525..cd86314b0 100644 --- a/nomad/structs/network.go +++ b/nomad/structs/network.go @@ -5,12 +5,11 @@ package structs import ( "fmt" + "maps" "math/rand" "net" + "slices" "sync" - - "golang.org/x/exp/maps" - "golang.org/x/exp/slices" ) const ( diff --git a/nomad/structs/service_registration.go b/nomad/structs/service_registration.go index b170bbdb8..2b2bf7a4d 100644 --- a/nomad/structs/service_registration.go +++ b/nomad/structs/service_registration.go @@ -7,10 +7,10 @@ import ( "crypto/md5" "encoding/binary" "fmt" + "slices" "github.com/hashicorp/nomad/helper" "github.com/hashicorp/nomad/helper/ipaddr" - "golang.org/x/exp/slices" ) const ( diff --git a/nomad/structs/services.go b/nomad/structs/services.go index 49bdf2dee..90fae9921 100644 --- a/nomad/structs/services.go +++ b/nomad/structs/services.go @@ -10,9 +10,11 @@ import ( "fmt" "hash" "io" + "maps" "net/url" "reflect" "regexp" + "slices" "sort" "strconv" "strings" @@ -25,8 +27,6 @@ import ( "github.com/hashicorp/nomad/helper/args" "github.com/hashicorp/nomad/helper/pointer" "github.com/mitchellh/copystructure" - "golang.org/x/exp/maps" - "golang.org/x/exp/slices" ) const ( diff --git a/nomad/structs/structs.go b/nomad/structs/structs.go index 35d64d1a1..d9c12bcd1 100644 --- a/nomad/structs/structs.go +++ b/nomad/structs/structs.go @@ -17,11 +17,13 @@ import ( "fmt" "hash" "hash/crc32" + "maps" "math" "net" "os" "reflect" "regexp" + "slices" "sort" "strconv" "strings" @@ -49,8 +51,6 @@ import ( "github.com/mitchellh/copystructure" "github.com/ryanuber/go-glob" "golang.org/x/crypto/blake2b" - "golang.org/x/exp/maps" - "golang.org/x/exp/slices" ) var ( diff --git a/nomad/structs/workload_id.go b/nomad/structs/workload_id.go index cb5055c25..6b2f10fcd 100644 --- a/nomad/structs/workload_id.go +++ b/nomad/structs/workload_id.go @@ -5,9 +5,9 @@ package structs import ( "fmt" + "slices" "github.com/hashicorp/go-multierror" - "golang.org/x/exp/slices" ) const ( diff --git a/nomad/util.go b/nomad/util.go index c4a20bdfb..6effadb98 100644 --- a/nomad/util.go +++ b/nomad/util.go @@ -9,6 +9,7 @@ import ( "net" "os" "path/filepath" + "slices" "strconv" memdb "github.com/hashicorp/go-memdb" @@ -16,7 +17,6 @@ import ( "github.com/hashicorp/nomad/nomad/state" "github.com/hashicorp/nomad/nomad/structs" "github.com/hashicorp/serf/serf" - "golang.org/x/exp/slices" ) const ( diff --git a/scheduler/generic_sched_test.go b/scheduler/generic_sched_test.go index 128f1e3f9..e6769da15 100644 --- a/scheduler/generic_sched_test.go +++ b/scheduler/generic_sched_test.go @@ -6,6 +6,7 @@ package scheduler import ( "fmt" "reflect" + "slices" "sort" "testing" "time" @@ -21,7 +22,6 @@ import ( "github.com/shoenig/test/must" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "golang.org/x/exp/slices" ) func TestServiceSched_JobRegister(t *testing.T) { diff --git a/scheduler/util.go b/scheduler/util.go index bd46e1fdc..47605c54a 100644 --- a/scheduler/util.go +++ b/scheduler/util.go @@ -6,14 +6,14 @@ package scheduler import ( "encoding/binary" "fmt" + "maps" "math/rand" + "slices" log "github.com/hashicorp/go-hclog" memdb "github.com/hashicorp/go-memdb" "github.com/hashicorp/nomad/helper" "github.com/hashicorp/nomad/nomad/structs" - "golang.org/x/exp/maps" - "golang.org/x/exp/slices" ) // allocTuple is a tuple of the allocation name and potential alloc ID