diff --git a/gwctl/cmd/main.go b/gwctl/cmd/main.go index 4c21795150..999e03026a 100644 --- a/gwctl/cmd/main.go +++ b/gwctl/cmd/main.go @@ -18,15 +18,14 @@ package main import ( "context" - _ "embed" "flag" "os" "path" - "k8s.io/klog/v2" - "github.com/spf13/cobra" cobraflag "github.com/spf13/pflag" + "k8s.io/klog/v2" + "sigs.k8s.io/gateway-api/gwctl/pkg/cmd/describe" "sigs.k8s.io/gateway-api/gwctl/pkg/cmd/get" cmdutils "sigs.k8s.io/gateway-api/gwctl/pkg/cmd/utils" diff --git a/gwctl/pkg/cmd/describe/describe.go b/gwctl/pkg/cmd/describe/describe.go index 49d85cf09d..e4230f5cf0 100644 --- a/gwctl/pkg/cmd/describe/describe.go +++ b/gwctl/pkg/cmd/describe/describe.go @@ -21,10 +21,10 @@ import ( "fmt" "os" + "github.com/spf13/cobra" "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" - gatewayv1beta1 "sigs.k8s.io/gateway-api/apis/v1beta1" - "github.com/spf13/cobra" + gatewayv1beta1 "sigs.k8s.io/gateway-api/apis/v1beta1" "sigs.k8s.io/gateway-api/gwctl/pkg/cmd/utils" "sigs.k8s.io/gateway-api/gwctl/pkg/cmd/utils/printer" "sigs.k8s.io/gateway-api/gwctl/pkg/common/resourcehelpers" diff --git a/gwctl/pkg/cmd/get/get.go b/gwctl/pkg/cmd/get/get.go index 193b5f04d1..a3e66f0267 100644 --- a/gwctl/pkg/cmd/get/get.go +++ b/gwctl/pkg/cmd/get/get.go @@ -22,6 +22,7 @@ import ( "os" "github.com/spf13/cobra" + "sigs.k8s.io/gateway-api/gwctl/pkg/cmd/utils" "sigs.k8s.io/gateway-api/gwctl/pkg/cmd/utils/printer" "sigs.k8s.io/gateway-api/gwctl/pkg/common/resourcehelpers" diff --git a/gwctl/pkg/cmd/utils/printer/backends.go b/gwctl/pkg/cmd/utils/printer/backends.go index 6e6cf3e2da..18fc11b4d7 100644 --- a/gwctl/pkg/cmd/utils/printer/backends.go +++ b/gwctl/pkg/cmd/utils/printer/backends.go @@ -21,11 +21,11 @@ import ( "fmt" "io" - "sigs.k8s.io/gateway-api/gwctl/pkg/effectivepolicy" - "sigs.k8s.io/gateway-api/gwctl/pkg/policymanager" - "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" "sigs.k8s.io/yaml" + + "sigs.k8s.io/gateway-api/gwctl/pkg/effectivepolicy" + "sigs.k8s.io/gateway-api/gwctl/pkg/policymanager" ) type BackendsPrinter struct { diff --git a/gwctl/pkg/cmd/utils/printer/gatewayclasses.go b/gwctl/pkg/cmd/utils/printer/gatewayclasses.go index caddba1efc..aa7ab7a610 100644 --- a/gwctl/pkg/cmd/utils/printer/gatewayclasses.go +++ b/gwctl/pkg/cmd/utils/printer/gatewayclasses.go @@ -18,15 +18,14 @@ package printer import ( "context" - _ "embed" "fmt" "io" - "sigs.k8s.io/gateway-api/gwctl/pkg/effectivepolicy" - "sigs.k8s.io/gateway-api/gwctl/pkg/policymanager" - gatewayv1beta1 "sigs.k8s.io/gateway-api/apis/v1beta1" "sigs.k8s.io/yaml" + + "sigs.k8s.io/gateway-api/gwctl/pkg/effectivepolicy" + "sigs.k8s.io/gateway-api/gwctl/pkg/policymanager" ) type GatewayClassesPrinter struct { diff --git a/gwctl/pkg/cmd/utils/printer/gatewayclasses_test.go b/gwctl/pkg/cmd/utils/printer/gatewayclasses_test.go index b0fb8a13cf..6ef687fa0a 100644 --- a/gwctl/pkg/cmd/utils/printer/gatewayclasses_test.go +++ b/gwctl/pkg/cmd/utils/printer/gatewayclasses_test.go @@ -22,17 +22,17 @@ import ( "testing" "github.com/google/go-cmp/cmp" - "sigs.k8s.io/gateway-api/gwctl/pkg/cmd/utils" - "sigs.k8s.io/gateway-api/gwctl/pkg/common" - "sigs.k8s.io/gateway-api/gwctl/pkg/common/resourcehelpers" - "sigs.k8s.io/gateway-api/gwctl/pkg/effectivepolicy" - apiextensionsv1 "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" "k8s.io/apimachinery/pkg/runtime" gatewayv1alpha2 "sigs.k8s.io/gateway-api/apis/v1alpha2" gatewayv1beta1 "sigs.k8s.io/gateway-api/apis/v1beta1" + + "sigs.k8s.io/gateway-api/gwctl/pkg/cmd/utils" + "sigs.k8s.io/gateway-api/gwctl/pkg/common" + "sigs.k8s.io/gateway-api/gwctl/pkg/common/resourcehelpers" + "sigs.k8s.io/gateway-api/gwctl/pkg/effectivepolicy" ) func TestGatewayClassesPrinter_PrintDescribeView(t *testing.T) { diff --git a/gwctl/pkg/cmd/utils/printer/gateways.go b/gwctl/pkg/cmd/utils/printer/gateways.go index f60840f902..79cd1c9da4 100644 --- a/gwctl/pkg/cmd/utils/printer/gateways.go +++ b/gwctl/pkg/cmd/utils/printer/gateways.go @@ -18,7 +18,6 @@ package printer import ( "context" - _ "embed" "fmt" "io" diff --git a/gwctl/pkg/cmd/utils/printer/gateways_test.go b/gwctl/pkg/cmd/utils/printer/gateways_test.go index f1e6203fd8..e5fa9190d5 100644 --- a/gwctl/pkg/cmd/utils/printer/gateways_test.go +++ b/gwctl/pkg/cmd/utils/printer/gateways_test.go @@ -22,17 +22,17 @@ import ( "testing" "github.com/google/go-cmp/cmp" - "sigs.k8s.io/gateway-api/gwctl/pkg/cmd/utils" - "sigs.k8s.io/gateway-api/gwctl/pkg/common" - "sigs.k8s.io/gateway-api/gwctl/pkg/common/resourcehelpers" - "sigs.k8s.io/gateway-api/gwctl/pkg/effectivepolicy" - apiextensionsv1 "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" "k8s.io/apimachinery/pkg/runtime" gatewayv1alpha2 "sigs.k8s.io/gateway-api/apis/v1alpha2" gatewayv1beta1 "sigs.k8s.io/gateway-api/apis/v1beta1" + + "sigs.k8s.io/gateway-api/gwctl/pkg/cmd/utils" + "sigs.k8s.io/gateway-api/gwctl/pkg/common" + "sigs.k8s.io/gateway-api/gwctl/pkg/common/resourcehelpers" + "sigs.k8s.io/gateway-api/gwctl/pkg/effectivepolicy" ) func TestGatewaysPrinter_PrintDescribeView(t *testing.T) { diff --git a/gwctl/pkg/cmd/utils/printer/httproutes.go b/gwctl/pkg/cmd/utils/printer/httproutes.go index f7feafc0e1..6c79a5d335 100644 --- a/gwctl/pkg/cmd/utils/printer/httproutes.go +++ b/gwctl/pkg/cmd/utils/printer/httproutes.go @@ -18,7 +18,6 @@ package printer import ( "context" - _ "embed" "fmt" "io" "strings" diff --git a/gwctl/pkg/cmd/utils/printer/httproutes_test.go b/gwctl/pkg/cmd/utils/printer/httproutes_test.go index 60e9d83d34..28f78191c6 100644 --- a/gwctl/pkg/cmd/utils/printer/httproutes_test.go +++ b/gwctl/pkg/cmd/utils/printer/httproutes_test.go @@ -22,17 +22,17 @@ import ( "testing" "github.com/google/go-cmp/cmp" - "sigs.k8s.io/gateway-api/gwctl/pkg/cmd/utils" - "sigs.k8s.io/gateway-api/gwctl/pkg/common" - "sigs.k8s.io/gateway-api/gwctl/pkg/common/resourcehelpers" - "sigs.k8s.io/gateway-api/gwctl/pkg/effectivepolicy" - apiextensionsv1 "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" "k8s.io/apimachinery/pkg/runtime" gatewayv1alpha2 "sigs.k8s.io/gateway-api/apis/v1alpha2" gatewayv1beta1 "sigs.k8s.io/gateway-api/apis/v1beta1" + + "sigs.k8s.io/gateway-api/gwctl/pkg/cmd/utils" + "sigs.k8s.io/gateway-api/gwctl/pkg/common" + "sigs.k8s.io/gateway-api/gwctl/pkg/common/resourcehelpers" + "sigs.k8s.io/gateway-api/gwctl/pkg/effectivepolicy" ) func TestHTTPRoutesPrinter_PrintDescribeView(t *testing.T) { diff --git a/gwctl/pkg/cmd/utils/printer/policies.go b/gwctl/pkg/cmd/utils/printer/policies.go index 4399618593..8f12963d02 100644 --- a/gwctl/pkg/cmd/utils/printer/policies.go +++ b/gwctl/pkg/cmd/utils/printer/policies.go @@ -17,7 +17,6 @@ limitations under the License. package printer import ( - _ "embed" "fmt" "io" "sort" diff --git a/gwctl/pkg/cmd/utils/printer/policies_test.go b/gwctl/pkg/cmd/utils/printer/policies_test.go index 375234856b..28e86f1c6a 100644 --- a/gwctl/pkg/cmd/utils/printer/policies_test.go +++ b/gwctl/pkg/cmd/utils/printer/policies_test.go @@ -21,14 +21,14 @@ import ( "testing" "github.com/google/go-cmp/cmp" - "sigs.k8s.io/gateway-api/gwctl/pkg/cmd/utils" - "sigs.k8s.io/gateway-api/gwctl/pkg/common" - apiextensionsv1 "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" "k8s.io/apimachinery/pkg/runtime" gatewayv1alpha2 "sigs.k8s.io/gateway-api/apis/v1alpha2" + + "sigs.k8s.io/gateway-api/gwctl/pkg/cmd/utils" + "sigs.k8s.io/gateway-api/gwctl/pkg/common" ) func TestPoliciesPrinter_Print_And_PrintDescribeView(t *testing.T) { diff --git a/gwctl/pkg/common/resourcehelpers/backends.go b/gwctl/pkg/common/resourcehelpers/backends.go index 68e58cc701..dbcebf5d29 100644 --- a/gwctl/pkg/common/resourcehelpers/backends.go +++ b/gwctl/pkg/common/resourcehelpers/backends.go @@ -26,6 +26,7 @@ import ( "k8s.io/apimachinery/pkg/runtime/schema" "k8s.io/client-go/discovery" "k8s.io/utils/strings/slices" + "sigs.k8s.io/gateway-api/gwctl/pkg/common" ) diff --git a/gwctl/pkg/common/resourcehelpers/gatewayclasses.go b/gwctl/pkg/common/resourcehelpers/gatewayclasses.go index b8dc5ec4dd..2aa886c9a2 100644 --- a/gwctl/pkg/common/resourcehelpers/gatewayclasses.go +++ b/gwctl/pkg/common/resourcehelpers/gatewayclasses.go @@ -18,10 +18,10 @@ package resourcehelpers import ( "context" - _ "embed" apimachinerytypes "k8s.io/apimachinery/pkg/types" gatewayv1beta1 "sigs.k8s.io/gateway-api/apis/v1beta1" + "sigs.k8s.io/gateway-api/gwctl/pkg/common" ) diff --git a/gwctl/pkg/common/resourcehelpers/gateways.go b/gwctl/pkg/common/resourcehelpers/gateways.go index 968307e83b..8fc7b5e5cf 100644 --- a/gwctl/pkg/common/resourcehelpers/gateways.go +++ b/gwctl/pkg/common/resourcehelpers/gateways.go @@ -18,11 +18,11 @@ package resourcehelpers import ( "context" - _ "embed" apimachinerytypes "k8s.io/apimachinery/pkg/types" "sigs.k8s.io/controller-runtime/pkg/client" gatewayv1beta1 "sigs.k8s.io/gateway-api/apis/v1beta1" + "sigs.k8s.io/gateway-api/gwctl/pkg/common" ) diff --git a/gwctl/pkg/common/resourcehelpers/httproutes.go b/gwctl/pkg/common/resourcehelpers/httproutes.go index cc25315276..61ae6c2f58 100644 --- a/gwctl/pkg/common/resourcehelpers/httproutes.go +++ b/gwctl/pkg/common/resourcehelpers/httproutes.go @@ -18,11 +18,11 @@ package resourcehelpers import ( "context" - _ "embed" apimachinerytypes "k8s.io/apimachinery/pkg/types" "sigs.k8s.io/controller-runtime/pkg/client" gatewayv1beta1 "sigs.k8s.io/gateway-api/apis/v1beta1" + "sigs.k8s.io/gateway-api/gwctl/pkg/common" ) diff --git a/gwctl/pkg/effectivepolicy/backends.go b/gwctl/pkg/effectivepolicy/backends.go index a898e76d94..b079992e40 100644 --- a/gwctl/pkg/effectivepolicy/backends.go +++ b/gwctl/pkg/effectivepolicy/backends.go @@ -19,12 +19,12 @@ package effectivepolicy import ( "context" + "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" + gatewayv1beta1 "sigs.k8s.io/gateway-api/apis/v1beta1" + "sigs.k8s.io/gateway-api/gwctl/pkg/common" "sigs.k8s.io/gateway-api/gwctl/pkg/common/resourcehelpers" "sigs.k8s.io/gateway-api/gwctl/pkg/policymanager" - - "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" - gatewayv1beta1 "sigs.k8s.io/gateway-api/apis/v1beta1" ) type backends struct { diff --git a/gwctl/pkg/effectivepolicy/gatewayclasses.go b/gwctl/pkg/effectivepolicy/gatewayclasses.go index c178dba780..4025823770 100644 --- a/gwctl/pkg/effectivepolicy/gatewayclasses.go +++ b/gwctl/pkg/effectivepolicy/gatewayclasses.go @@ -18,11 +18,10 @@ package effectivepolicy import ( "context" - _ "embed" - - "sigs.k8s.io/gateway-api/gwctl/pkg/policymanager" gatewayv1beta1 "sigs.k8s.io/gateway-api/apis/v1beta1" + + "sigs.k8s.io/gateway-api/gwctl/pkg/policymanager" ) type gatewayClasses struct { diff --git a/gwctl/pkg/effectivepolicy/gateways.go b/gwctl/pkg/effectivepolicy/gateways.go index 5226e27044..f2ff0433ae 100644 --- a/gwctl/pkg/effectivepolicy/gateways.go +++ b/gwctl/pkg/effectivepolicy/gateways.go @@ -18,7 +18,6 @@ package effectivepolicy import ( "context" - _ "embed" gatewayv1beta1 "sigs.k8s.io/gateway-api/apis/v1beta1" diff --git a/gwctl/pkg/effectivepolicy/httproutes.go b/gwctl/pkg/effectivepolicy/httproutes.go index 40fee0bc8a..d8fd1b8ec1 100644 --- a/gwctl/pkg/effectivepolicy/httproutes.go +++ b/gwctl/pkg/effectivepolicy/httproutes.go @@ -18,7 +18,6 @@ package effectivepolicy import ( "context" - _ "embed" "fmt" gatewayv1beta1 "sigs.k8s.io/gateway-api/apis/v1beta1"