Skip to content

Commit 73ddf1b

Browse files
committed
mod: Update Nomad Go module to github.com/hashicorp/nomad/v2.
The last Nomad release was tagged with v2.0.0. While Nomad's core is not designed to be directly imported, it happens. Go's module constraints requires a module with a tagged 2.x to have a module suffix of /v2; the same for 3.x and such. This change modifies the Nomad module to have the v2 suffix and updates all imports as such.
1 parent 505b8f5 commit 73ddf1b

1,405 files changed

Lines changed: 6180 additions & 6180 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

acl/acl_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
// Copyright IBM Corp. 2015, 2025
1+
// Copyright IBM Corp. 2015, 2026
22
// SPDX-License-Identifier: BUSL-1.1
33

44
package acl
55

66
import (
77
"testing"
88

9-
"github.com/hashicorp/nomad/ci"
9+
"github.com/hashicorp/nomad/v2/ci"
1010
"github.com/shoenig/test/must"
1111
)
1212

acl/policy_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright IBM Corp. 2015, 2025
1+
// Copyright IBM Corp. 2015, 2026
22
// SPDX-License-Identifier: BUSL-1.1
33

44
package acl
@@ -10,7 +10,7 @@ import (
1010
"strings"
1111
"testing"
1212

13-
"github.com/hashicorp/nomad/ci"
13+
"github.com/hashicorp/nomad/v2/ci"
1414
"github.com/shoenig/test"
1515
"github.com/shoenig/test/must"
1616
)

client/acl.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright IBM Corp. 2015, 2025
1+
// Copyright IBM Corp. 2015, 2026
22
// SPDX-License-Identifier: BUSL-1.1
33

44
package client
@@ -8,8 +8,8 @@ import (
88

99
metrics "github.com/hashicorp/go-metrics/compat"
1010
"github.com/hashicorp/go-set/v3"
11-
"github.com/hashicorp/nomad/acl"
12-
"github.com/hashicorp/nomad/nomad/structs"
11+
"github.com/hashicorp/nomad/v2/acl"
12+
"github.com/hashicorp/nomad/v2/nomad/structs"
1313
)
1414

1515
const (

client/acl_test.go

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright IBM Corp. 2015, 2025
1+
// Copyright IBM Corp. 2015, 2026
22
// SPDX-License-Identifier: BUSL-1.1
33

44
package client
@@ -8,14 +8,14 @@ import (
88
"testing"
99
"time"
1010

11-
"github.com/hashicorp/nomad/acl"
12-
"github.com/hashicorp/nomad/ci"
13-
"github.com/hashicorp/nomad/client/config"
14-
"github.com/hashicorp/nomad/helper/pointer"
15-
"github.com/hashicorp/nomad/helper/uuid"
16-
"github.com/hashicorp/nomad/nomad/mock"
17-
"github.com/hashicorp/nomad/nomad/structs"
18-
"github.com/hashicorp/nomad/testutil"
11+
"github.com/hashicorp/nomad/v2/acl"
12+
"github.com/hashicorp/nomad/v2/ci"
13+
"github.com/hashicorp/nomad/v2/client/config"
14+
"github.com/hashicorp/nomad/v2/helper/pointer"
15+
"github.com/hashicorp/nomad/v2/helper/uuid"
16+
"github.com/hashicorp/nomad/v2/nomad/mock"
17+
"github.com/hashicorp/nomad/v2/nomad/structs"
18+
"github.com/hashicorp/nomad/v2/testutil"
1919
"github.com/shoenig/test"
2020
"github.com/shoenig/test/must"
2121
"github.com/shoenig/test/wait"

client/agent_endpoint.go

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright IBM Corp. 2015, 2025
1+
// Copyright IBM Corp. 2015, 2026
22
// SPDX-License-Identifier: BUSL-1.1
33

44
package client
@@ -13,13 +13,13 @@ import (
1313
log "github.com/hashicorp/go-hclog"
1414
metrics "github.com/hashicorp/go-metrics/compat"
1515
"github.com/hashicorp/go-msgpack/v2/codec"
16-
sframer "github.com/hashicorp/nomad/client/lib/streamframer"
17-
cstructs "github.com/hashicorp/nomad/client/structs"
18-
"github.com/hashicorp/nomad/command/agent/host"
19-
"github.com/hashicorp/nomad/command/agent/monitor"
20-
"github.com/hashicorp/nomad/command/agent/pprof"
21-
"github.com/hashicorp/nomad/helper/pointer"
22-
"github.com/hashicorp/nomad/nomad/structs"
16+
sframer "github.com/hashicorp/nomad/v2/client/lib/streamframer"
17+
cstructs "github.com/hashicorp/nomad/v2/client/structs"
18+
"github.com/hashicorp/nomad/v2/command/agent/host"
19+
"github.com/hashicorp/nomad/v2/command/agent/monitor"
20+
"github.com/hashicorp/nomad/v2/command/agent/pprof"
21+
"github.com/hashicorp/nomad/v2/helper/pointer"
22+
"github.com/hashicorp/nomad/v2/nomad/structs"
2323
)
2424

2525
type Agent struct {

client/agent_endpoint_test.go

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright IBM Corp. 2015, 2025
1+
// Copyright IBM Corp. 2015, 2026
22
// SPDX-License-Identifier: BUSL-1.1
33

44
package client
@@ -14,17 +14,17 @@ import (
1414
"time"
1515

1616
"github.com/hashicorp/go-msgpack/v2/codec"
17-
"github.com/hashicorp/nomad/acl"
18-
"github.com/hashicorp/nomad/ci"
19-
"github.com/hashicorp/nomad/client/config"
20-
sframer "github.com/hashicorp/nomad/client/lib/streamframer"
21-
cstructs "github.com/hashicorp/nomad/client/structs"
22-
"github.com/hashicorp/nomad/command/agent/monitor"
23-
"github.com/hashicorp/nomad/command/agent/pprof"
24-
"github.com/hashicorp/nomad/nomad"
25-
"github.com/hashicorp/nomad/nomad/mock"
26-
"github.com/hashicorp/nomad/nomad/structs"
27-
"github.com/hashicorp/nomad/testutil"
17+
"github.com/hashicorp/nomad/v2/acl"
18+
"github.com/hashicorp/nomad/v2/ci"
19+
"github.com/hashicorp/nomad/v2/client/config"
20+
sframer "github.com/hashicorp/nomad/v2/client/lib/streamframer"
21+
cstructs "github.com/hashicorp/nomad/v2/client/structs"
22+
"github.com/hashicorp/nomad/v2/command/agent/monitor"
23+
"github.com/hashicorp/nomad/v2/command/agent/pprof"
24+
"github.com/hashicorp/nomad/v2/nomad"
25+
"github.com/hashicorp/nomad/v2/nomad/mock"
26+
"github.com/hashicorp/nomad/v2/nomad/structs"
27+
"github.com/hashicorp/nomad/v2/testutil"
2828
"github.com/shoenig/test/must"
2929
"github.com/stretchr/testify/assert"
3030
"github.com/stretchr/testify/require"

client/alloc_endpoint.go

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright IBM Corp. 2015, 2025
1+
// Copyright IBM Corp. 2015, 2026
22
// SPDX-License-Identifier: BUSL-1.1
33

44
package client
@@ -14,13 +14,13 @@ import (
1414

1515
metrics "github.com/hashicorp/go-metrics/compat"
1616
"github.com/hashicorp/go-msgpack/v2/codec"
17-
"github.com/hashicorp/nomad/acl"
18-
cstructs "github.com/hashicorp/nomad/client/structs"
19-
"github.com/hashicorp/nomad/helper/pointer"
20-
"github.com/hashicorp/nomad/helper/uuid"
21-
nstructs "github.com/hashicorp/nomad/nomad/structs"
22-
"github.com/hashicorp/nomad/plugins/drivers"
23-
"github.com/hashicorp/nomad/plugins/drivers/fsisolation"
17+
"github.com/hashicorp/nomad/v2/acl"
18+
cstructs "github.com/hashicorp/nomad/v2/client/structs"
19+
"github.com/hashicorp/nomad/v2/helper/pointer"
20+
"github.com/hashicorp/nomad/v2/helper/uuid"
21+
nstructs "github.com/hashicorp/nomad/v2/nomad/structs"
22+
"github.com/hashicorp/nomad/v2/plugins/drivers"
23+
"github.com/hashicorp/nomad/v2/plugins/drivers/fsisolation"
2424
)
2525

2626
// Allocations endpoint is used for interacting with client allocations

client/alloc_endpoint_test.go

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright IBM Corp. 2015, 2025
1+
// Copyright IBM Corp. 2015, 2026
22
// SPDX-License-Identifier: BUSL-1.1
33

44
package client
@@ -14,19 +14,19 @@ import (
1414
"time"
1515

1616
"github.com/hashicorp/go-msgpack/v2/codec"
17-
"github.com/hashicorp/nomad/acl"
18-
"github.com/hashicorp/nomad/ci"
19-
"github.com/hashicorp/nomad/client/config"
20-
"github.com/hashicorp/nomad/client/lib/proclib"
21-
cstructs "github.com/hashicorp/nomad/client/structs"
22-
"github.com/hashicorp/nomad/helper/pluginutils/catalog"
23-
"github.com/hashicorp/nomad/helper/uuid"
24-
"github.com/hashicorp/nomad/nomad"
25-
"github.com/hashicorp/nomad/nomad/mock"
26-
nstructs "github.com/hashicorp/nomad/nomad/structs"
27-
nconfig "github.com/hashicorp/nomad/nomad/structs/config"
28-
"github.com/hashicorp/nomad/plugins/drivers"
29-
"github.com/hashicorp/nomad/testutil"
17+
"github.com/hashicorp/nomad/v2/acl"
18+
"github.com/hashicorp/nomad/v2/ci"
19+
"github.com/hashicorp/nomad/v2/client/config"
20+
"github.com/hashicorp/nomad/v2/client/lib/proclib"
21+
cstructs "github.com/hashicorp/nomad/v2/client/structs"
22+
"github.com/hashicorp/nomad/v2/helper/pluginutils/catalog"
23+
"github.com/hashicorp/nomad/v2/helper/uuid"
24+
"github.com/hashicorp/nomad/v2/nomad"
25+
"github.com/hashicorp/nomad/v2/nomad/mock"
26+
nstructs "github.com/hashicorp/nomad/v2/nomad/structs"
27+
nconfig "github.com/hashicorp/nomad/v2/nomad/structs/config"
28+
"github.com/hashicorp/nomad/v2/plugins/drivers"
29+
"github.com/hashicorp/nomad/v2/testutil"
3030
"github.com/shoenig/test/must"
3131
"github.com/stretchr/testify/require"
3232
"golang.org/x/sys/unix"

client/alloc_watcher_e2e_test.go

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright IBM Corp. 2015, 2025
1+
// Copyright IBM Corp. 2015, 2026
22
// SPDX-License-Identifier: BUSL-1.1
33

44
package client_test
@@ -10,13 +10,13 @@ import (
1010
"path/filepath"
1111
"testing"
1212

13-
"github.com/hashicorp/nomad/ci"
14-
"github.com/hashicorp/nomad/command/agent"
15-
"github.com/hashicorp/nomad/nomad"
16-
"github.com/hashicorp/nomad/nomad/mock"
17-
"github.com/hashicorp/nomad/nomad/structs"
18-
"github.com/hashicorp/nomad/nomad/structs/config"
19-
"github.com/hashicorp/nomad/testutil"
13+
"github.com/hashicorp/nomad/v2/ci"
14+
"github.com/hashicorp/nomad/v2/command/agent"
15+
"github.com/hashicorp/nomad/v2/nomad"
16+
"github.com/hashicorp/nomad/v2/nomad/mock"
17+
"github.com/hashicorp/nomad/v2/nomad/structs"
18+
"github.com/hashicorp/nomad/v2/nomad/structs/config"
19+
"github.com/hashicorp/nomad/v2/testutil"
2020
"github.com/stretchr/testify/require"
2121
)
2222

client/allocdir/alloc_dir.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright IBM Corp. 2015, 2025
1+
// Copyright IBM Corp. 2015, 2026
22
// SPDX-License-Identifier: BUSL-1.1
33

44
package allocdir
@@ -17,9 +17,9 @@ import (
1717

1818
hclog "github.com/hashicorp/go-hclog"
1919
multierror "github.com/hashicorp/go-multierror"
20-
cstructs "github.com/hashicorp/nomad/client/structs"
21-
"github.com/hashicorp/nomad/helper/escapingfs"
22-
"github.com/hashicorp/nomad/nomad/structs"
20+
cstructs "github.com/hashicorp/nomad/v2/client/structs"
21+
"github.com/hashicorp/nomad/v2/helper/escapingfs"
22+
"github.com/hashicorp/nomad/v2/nomad/structs"
2323
"github.com/hpcloud/tail/watch"
2424
tomb "gopkg.in/tomb.v1"
2525
)

0 commit comments

Comments
 (0)