Skip to content

Commit 6d1f5d2

Browse files
committed
Update go module to v2
Problem: With the release of v2.0 of NGINX Gateway Fabric, we need to update the go module version to include `/v2`, per Go module import standards. Otherwise, NGF cannot be imported past v1. Solution: Update the module version and all imports to v2.
1 parent 9308f2c commit 6d1f5d2

File tree

208 files changed

+767
-821
lines changed

Some content is hidden

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

208 files changed

+767
-821
lines changed

apis/v1alpha2/nginxproxy_types.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import (
55
apiextv1 "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1"
66
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
77

8-
"github.com/nginx/nginx-gateway-fabric/apis/v1alpha1"
8+
"github.com/nginx/nginx-gateway-fabric/v2/apis/v1alpha1"
99
)
1010

1111
// +genclient

apis/v1alpha2/observabilitypolicy_types.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import (
44
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
55
gatewayv1alpha2 "sigs.k8s.io/gateway-api/apis/v1alpha2"
66

7-
ngfAPIv1alpha1 "github.com/nginx/nginx-gateway-fabric/apis/v1alpha1"
7+
ngfAPIv1alpha1 "github.com/nginx/nginx-gateway-fabric/v2/apis/v1alpha1"
88
)
99

1010
// +genclient

apis/v1alpha2/zz_generated.deepcopy.go

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

cmd/gateway/commands.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,11 @@ import (
2020
"sigs.k8s.io/controller-runtime/pkg/log"
2121
ctlrZap "sigs.k8s.io/controller-runtime/pkg/log/zap"
2222

23-
"github.com/nginx/nginx-gateway-fabric/internal/controller"
24-
"github.com/nginx/nginx-gateway-fabric/internal/controller/config"
25-
"github.com/nginx/nginx-gateway-fabric/internal/controller/licensing"
26-
ngxConfig "github.com/nginx/nginx-gateway-fabric/internal/controller/nginx/config"
27-
"github.com/nginx/nginx-gateway-fabric/internal/framework/file"
23+
"github.com/nginx/nginx-gateway-fabric/v2/internal/controller"
24+
"github.com/nginx/nginx-gateway-fabric/v2/internal/controller/config"
25+
"github.com/nginx/nginx-gateway-fabric/v2/internal/controller/licensing"
26+
ngxConfig "github.com/nginx/nginx-gateway-fabric/v2/internal/controller/nginx/config"
27+
"github.com/nginx/nginx-gateway-fabric/v2/internal/framework/file"
2828
)
2929

3030
// These flags are shared by multiple commands.

cmd/gateway/commands_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import (
1010
"github.com/spf13/cobra"
1111
"github.com/spf13/pflag"
1212

13-
"github.com/nginx/nginx-gateway-fabric/internal/controller/config"
13+
"github.com/nginx/nginx-gateway-fabric/v2/internal/controller/config"
1414
)
1515

1616
type flagTestCase struct {

cmd/gateway/initialize.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@ import (
99

1010
"github.com/go-logr/logr"
1111

12-
"github.com/nginx/nginx-gateway-fabric/internal/controller/licensing"
13-
"github.com/nginx/nginx-gateway-fabric/internal/controller/nginx/config"
14-
"github.com/nginx/nginx-gateway-fabric/internal/framework/file"
12+
"github.com/nginx/nginx-gateway-fabric/v2/internal/controller/licensing"
13+
"github.com/nginx/nginx-gateway-fabric/v2/internal/controller/nginx/config"
14+
"github.com/nginx/nginx-gateway-fabric/v2/internal/framework/file"
1515
)
1616

1717
const (

cmd/gateway/initialize_test.go

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,12 @@ import (
1111
"github.com/go-logr/logr"
1212
. "github.com/onsi/gomega"
1313

14-
"github.com/nginx/nginx-gateway-fabric/internal/controller/licensing/licensingfakes"
15-
"github.com/nginx/nginx-gateway-fabric/internal/controller/nginx/config/configfakes"
16-
"github.com/nginx/nginx-gateway-fabric/internal/controller/state/dataplane"
17-
"github.com/nginx/nginx-gateway-fabric/internal/framework/file"
18-
"github.com/nginx/nginx-gateway-fabric/internal/framework/file/filefakes"
19-
"github.com/nginx/nginx-gateway-fabric/internal/framework/helpers"
14+
"github.com/nginx/nginx-gateway-fabric/v2/internal/controller/licensing/licensingfakes"
15+
"github.com/nginx/nginx-gateway-fabric/v2/internal/controller/nginx/config/configfakes"
16+
"github.com/nginx/nginx-gateway-fabric/v2/internal/controller/state/dataplane"
17+
"github.com/nginx/nginx-gateway-fabric/v2/internal/framework/file"
18+
"github.com/nginx/nginx-gateway-fabric/v2/internal/framework/file/filefakes"
19+
"github.com/nginx/nginx-gateway-fabric/v2/internal/framework/helpers"
2020
)
2121

2222
func TestInitialize_OSS(t *testing.T) {

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
module github.com/nginx/nginx-gateway-fabric
1+
module github.com/nginx/nginx-gateway-fabric/v2
22

33
go 1.24.2
44

internal/controller/config_updater.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ import (
1111
"k8s.io/apimachinery/pkg/util/validation/field"
1212
"k8s.io/client-go/tools/record"
1313

14-
ngfAPI "github.com/nginx/nginx-gateway-fabric/apis/v1alpha1"
15-
"github.com/nginx/nginx-gateway-fabric/internal/framework/helpers"
14+
ngfAPI "github.com/nginx/nginx-gateway-fabric/v2/apis/v1alpha1"
15+
"github.com/nginx/nginx-gateway-fabric/v2/internal/framework/helpers"
1616
)
1717

1818
// updateControlPlane updates the control plane configuration with the given user spec.

internal/controller/config_updater_test.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@ import (
1010
"k8s.io/apimachinery/pkg/types"
1111
"k8s.io/client-go/tools/record"
1212

13-
ngfAPI "github.com/nginx/nginx-gateway-fabric/apis/v1alpha1"
14-
"github.com/nginx/nginx-gateway-fabric/internal/controller/controllerfakes"
15-
"github.com/nginx/nginx-gateway-fabric/internal/framework/helpers"
13+
ngfAPI "github.com/nginx/nginx-gateway-fabric/v2/apis/v1alpha1"
14+
"github.com/nginx/nginx-gateway-fabric/v2/internal/controller/controllerfakes"
15+
"github.com/nginx/nginx-gateway-fabric/v2/internal/framework/helpers"
1616
)
1717

1818
func TestUpdateControlPlane(t *testing.T) {

0 commit comments

Comments
 (0)