diff --git a/apis/v1alpha2/util/translator/httproute.go b/apis/v1alpha2/util/translate/httproute.go similarity index 98% rename from apis/v1alpha2/util/translator/httproute.go rename to apis/v1alpha2/util/translate/httproute.go index be5db9e095..b0136e780f 100644 --- a/apis/v1alpha2/util/translator/httproute.go +++ b/apis/v1alpha2/util/translate/httproute.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package translator +package translate import ( gatewayv1a2 "sigs.k8s.io/gateway-api/apis/v1alpha2" diff --git a/apis/v1alpha2/util/translator/httproute_test.go b/apis/v1alpha2/util/translate/httproute_test.go similarity index 98% rename from apis/v1alpha2/util/translator/httproute_test.go rename to apis/v1alpha2/util/translate/httproute_test.go index 0b6986e2b2..8ad2045d6a 100644 --- a/apis/v1alpha2/util/translator/httproute_test.go +++ b/apis/v1alpha2/util/translate/httproute_test.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package translator +package translate import ( "testing" diff --git a/apis/v1alpha2/util/translator/shared_types.go b/apis/v1alpha2/util/translate/shared_types.go similarity index 99% rename from apis/v1alpha2/util/translator/shared_types.go rename to apis/v1alpha2/util/translate/shared_types.go index 71f8399643..9dc47bd18a 100644 --- a/apis/v1alpha2/util/translator/shared_types.go +++ b/apis/v1alpha2/util/translate/shared_types.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package translator +package translate import ( gatewayv1a2 "sigs.k8s.io/gateway-api/apis/v1alpha2" diff --git a/apis/v1alpha2/util/translator/shared_types_test.go b/apis/v1alpha2/util/translate/shared_types_test.go similarity index 98% rename from apis/v1alpha2/util/translator/shared_types_test.go rename to apis/v1alpha2/util/translate/shared_types_test.go index 5967049a94..21e0239457 100644 --- a/apis/v1alpha2/util/translator/shared_types_test.go +++ b/apis/v1alpha2/util/translate/shared_types_test.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package translator +package translate import ( "testing" diff --git a/apis/v1alpha2/validation/httproute_test.go b/apis/v1alpha2/validation/httproute_test.go index 24454e87e3..535fcab6e3 100644 --- a/apis/v1alpha2/validation/httproute_test.go +++ b/apis/v1alpha2/validation/httproute_test.go @@ -25,7 +25,7 @@ import ( utilpointer "k8s.io/utils/pointer" gatewayv1a2 "sigs.k8s.io/gateway-api/apis/v1alpha2" - "sigs.k8s.io/gateway-api/apis/v1alpha2/util/translator" + "sigs.k8s.io/gateway-api/apis/v1beta1/util/translate" ) func TestValidateHTTPRoute(t *testing.T) { @@ -45,7 +45,7 @@ func TestValidateHTTPRoute(t *testing.T) { Matches: []gatewayv1a2.HTTPRouteMatch{ { Path: &gatewayv1a2.HTTPPathMatch{ - Type: translator.PathMatchTypePtr("PathPrefix"), + Type: translate.PathMatchTypePtr("PathPrefix"), Value: utilpointer.String("/"), }, }, @@ -55,7 +55,7 @@ func TestValidateHTTPRoute(t *testing.T) { BackendRef: gatewayv1a2.BackendRef{ BackendObjectReference: gatewayv1a2.BackendObjectReference{ Name: testService, - Port: translator.PortNumberPtr(8080), + Port: translate.PortNumberPtr(8080), }, Weight: utilpointer.Int32(100), }, @@ -71,7 +71,7 @@ func TestValidateHTTPRoute(t *testing.T) { Matches: []gatewayv1a2.HTTPRouteMatch{ { Path: &gatewayv1a2.HTTPPathMatch{ - Type: translator.PathMatchTypePtr("PathPrefix"), + Type: translate.PathMatchTypePtr("PathPrefix"), Value: utilpointer.String("/"), }, }, @@ -82,7 +82,7 @@ func TestValidateHTTPRoute(t *testing.T) { RequestMirror: &gatewayv1a2.HTTPRequestMirrorFilter{ BackendRef: gatewayv1a2.BackendObjectReference{ Name: testService, - Port: translator.PortNumberPtr(8081), + Port: translate.PortNumberPtr(8081), }, }, }, @@ -97,7 +97,7 @@ func TestValidateHTTPRoute(t *testing.T) { Matches: []gatewayv1a2.HTTPRouteMatch{ { Path: &gatewayv1a2.HTTPPathMatch{ - Type: translator.PathMatchTypePtr("PathPrefix"), + Type: translate.PathMatchTypePtr("PathPrefix"), Value: utilpointer.String("/"), }, }, @@ -108,7 +108,7 @@ func TestValidateHTTPRoute(t *testing.T) { RequestMirror: &gatewayv1a2.HTTPRequestMirrorFilter{ BackendRef: gatewayv1a2.BackendObjectReference{ Name: testService, - Port: translator.PortNumberPtr(8080), + Port: translate.PortNumberPtr(8080), }, }, }, @@ -117,7 +117,7 @@ func TestValidateHTTPRoute(t *testing.T) { RequestMirror: &gatewayv1a2.HTTPRequestMirrorFilter{ BackendRef: gatewayv1a2.BackendObjectReference{ Name: specialService, - Port: translator.PortNumberPtr(8080), + Port: translate.PortNumberPtr(8080), }, }, }, @@ -132,7 +132,7 @@ func TestValidateHTTPRoute(t *testing.T) { Matches: []gatewayv1a2.HTTPRouteMatch{ { Path: &gatewayv1a2.HTTPPathMatch{ - Type: translator.PathMatchTypePtr("PathPrefix"), + Type: translate.PathMatchTypePtr("PathPrefix"), Value: utilpointer.String("/"), }, }, @@ -154,7 +154,7 @@ func TestValidateHTTPRoute(t *testing.T) { RequestMirror: &gatewayv1a2.HTTPRequestMirrorFilter{ BackendRef: gatewayv1a2.BackendObjectReference{ Name: testService, - Port: translator.PortNumberPtr(8080), + Port: translate.PortNumberPtr(8080), }, }, }, @@ -180,7 +180,7 @@ func TestValidateHTTPRoute(t *testing.T) { Matches: []gatewayv1a2.HTTPRouteMatch{ { Path: &gatewayv1a2.HTTPPathMatch{ - Type: translator.PathMatchTypePtr("PathPrefix"), + Type: translate.PathMatchTypePtr("PathPrefix"), Value: utilpointer.String("/"), }, }, @@ -191,7 +191,7 @@ func TestValidateHTTPRoute(t *testing.T) { RequestMirror: &gatewayv1a2.HTTPRequestMirrorFilter{ BackendRef: gatewayv1a2.BackendObjectReference{ Name: testService, - Port: translator.PortNumberPtr(8080), + Port: translate.PortNumberPtr(8080), }, }, }, @@ -211,7 +211,7 @@ func TestValidateHTTPRoute(t *testing.T) { RequestMirror: &gatewayv1a2.HTTPRequestMirrorFilter{ BackendRef: gatewayv1a2.BackendObjectReference{ Name: testService, - Port: translator.PortNumberPtr(8080), + Port: translate.PortNumberPtr(8080), }, }, }, @@ -231,7 +231,7 @@ func TestValidateHTTPRoute(t *testing.T) { RequestMirror: &gatewayv1a2.HTTPRequestMirrorFilter{ BackendRef: gatewayv1a2.BackendObjectReference{ Name: specialService, - Port: translator.PortNumberPtr(8080), + Port: translate.PortNumberPtr(8080), }, }, }, @@ -246,7 +246,7 @@ func TestValidateHTTPRoute(t *testing.T) { Matches: []gatewayv1a2.HTTPRouteMatch{ { Path: &gatewayv1a2.HTTPPathMatch{ - Type: translator.PathMatchTypePtr("PathPrefix"), + Type: translate.PathMatchTypePtr("PathPrefix"), Value: utilpointer.String("/"), }, }, @@ -268,7 +268,7 @@ func TestValidateHTTPRoute(t *testing.T) { RequestMirror: &gatewayv1a2.HTTPRequestMirrorFilter{ BackendRef: gatewayv1a2.BackendObjectReference{ Name: testService, - Port: translator.PortNumberPtr(8080), + Port: translate.PortNumberPtr(8080), }, }, }, @@ -453,7 +453,7 @@ func TestValidateHTTPBackendUniqueFilters(t *testing.T) { BackendRef: gatewayv1a2.BackendRef{ BackendObjectReference: gatewayv1a2.BackendObjectReference{ Name: testService, - Port: translator.PortNumberPtr(8080), + Port: translate.PortNumberPtr(8080), }, Weight: utilpointer.Int32(100), }, @@ -463,7 +463,7 @@ func TestValidateHTTPBackendUniqueFilters(t *testing.T) { RequestMirror: &gatewayv1a2.HTTPRequestMirrorFilter{ BackendRef: gatewayv1a2.BackendObjectReference{ Name: testService, - Port: translator.PortNumberPtr(8080), + Port: translate.PortNumberPtr(8080), }, }, }, @@ -480,7 +480,7 @@ func TestValidateHTTPBackendUniqueFilters(t *testing.T) { BackendRef: gatewayv1a2.BackendRef{ BackendObjectReference: gatewayv1a2.BackendObjectReference{ Name: testService, - Port: translator.PortNumberPtr(8080), + Port: translate.PortNumberPtr(8080), }, }, Filters: []gatewayv1a2.HTTPRouteFilter{ @@ -489,7 +489,7 @@ func TestValidateHTTPBackendUniqueFilters(t *testing.T) { RequestMirror: &gatewayv1a2.HTTPRequestMirrorFilter{ BackendRef: gatewayv1a2.BackendObjectReference{ Name: testService, - Port: translator.PortNumberPtr(8080), + Port: translate.PortNumberPtr(8080), }, }, }, @@ -498,7 +498,7 @@ func TestValidateHTTPBackendUniqueFilters(t *testing.T) { RequestMirror: &gatewayv1a2.HTTPRequestMirrorFilter{ BackendRef: gatewayv1a2.BackendObjectReference{ Name: specialService, - Port: translator.PortNumberPtr(8080), + Port: translate.PortNumberPtr(8080), }, }, }, @@ -527,21 +527,21 @@ func TestValidateHTTPPathMatch(t *testing.T) { }{{ name: "invalid httpRoute prefix", path: &gatewayv1a2.HTTPPathMatch{ - Type: translator.PathMatchTypePtr("PathPrefix"), + Type: translate.PathMatchTypePtr("PathPrefix"), Value: utilpointer.String("/."), }, errCount: 1, }, { name: "invalid httpRoute Exact", path: &gatewayv1a2.HTTPPathMatch{ - Type: translator.PathMatchTypePtr("Exact"), + Type: translate.PathMatchTypePtr("Exact"), Value: utilpointer.String("/foo/./bar"), }, errCount: 1, }, { name: "invalid httpRoute prefix", path: &gatewayv1a2.HTTPPathMatch{ - Type: translator.PathMatchTypePtr("PathPrefix"), + Type: translate.PathMatchTypePtr("PathPrefix"), Value: utilpointer.String("/"), }, errCount: 0, @@ -558,7 +558,7 @@ func TestValidateHTTPPathMatch(t *testing.T) { BackendRef: gatewayv1a2.BackendRef{ BackendObjectReference: gatewayv1a2.BackendObjectReference{ Name: gatewayv1a2.ObjectName("test"), - Port: translator.PortNumberPtr(8080), + Port: translate.PortNumberPtr(8080), }, }, }}, @@ -619,7 +619,7 @@ func TestValidateHTTPHeaderMatches(t *testing.T) { BackendRef: gatewayv1a2.BackendRef{ BackendObjectReference: gatewayv1a2.BackendObjectReference{ Name: gatewayv1a2.ObjectName("test"), - Port: translator.PortNumberPtr(8080), + Port: translate.PortNumberPtr(8080), }, }, }}, @@ -683,7 +683,7 @@ func TestValidateHTTPQueryParamMatches(t *testing.T) { BackendRef: gatewayv1a2.BackendRef{ BackendObjectReference: gatewayv1a2.BackendObjectReference{ Name: gatewayv1a2.ObjectName("test"), - Port: translator.PortNumberPtr(8080), + Port: translate.PortNumberPtr(8080), }, }, }}, @@ -840,7 +840,7 @@ func TestValidateHTTPRouteTypeMatchesField(t *testing.T) { Kind: new(gatewayv1a2.Kind), Name: "name", Namespace: new(gatewayv1a2.Namespace), - Port: translator.PortNumberPtr(22), + Port: translate.PortNumberPtr(22), }}, }, errCount: 0, @@ -946,7 +946,7 @@ func TestValidateHTTPRouteTypeMatchesField(t *testing.T) { BackendRef: gatewayv1a2.BackendRef{ BackendObjectReference: gatewayv1a2.BackendObjectReference{ Name: gatewayv1a2.ObjectName("test"), - Port: translator.PortNumberPtr(8080), + Port: translate.PortNumberPtr(8080), }, }, }}, diff --git a/apis/v1beta1/util/translator/httproute.go b/apis/v1beta1/util/translate/httproute.go similarity index 98% rename from apis/v1beta1/util/translator/httproute.go rename to apis/v1beta1/util/translate/httproute.go index 1603781d87..20a9edd62a 100644 --- a/apis/v1beta1/util/translator/httproute.go +++ b/apis/v1beta1/util/translate/httproute.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package translator +package translate import ( gatewayv1b1 "sigs.k8s.io/gateway-api/apis/v1beta1" diff --git a/apis/v1beta1/util/translator/httproute_test.go b/apis/v1beta1/util/translate/httproute_test.go similarity index 98% rename from apis/v1beta1/util/translator/httproute_test.go rename to apis/v1beta1/util/translate/httproute_test.go index 8c1e002530..9dfcbbe464 100644 --- a/apis/v1beta1/util/translator/httproute_test.go +++ b/apis/v1beta1/util/translate/httproute_test.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package translator +package translate import ( "testing" diff --git a/apis/v1beta1/util/translator/shared_types.go b/apis/v1beta1/util/translate/shared_types.go similarity index 99% rename from apis/v1beta1/util/translator/shared_types.go rename to apis/v1beta1/util/translate/shared_types.go index 021c693002..30776e30f5 100644 --- a/apis/v1beta1/util/translator/shared_types.go +++ b/apis/v1beta1/util/translate/shared_types.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package translator +package translate import ( gatewayv1b1 "sigs.k8s.io/gateway-api/apis/v1beta1" diff --git a/apis/v1beta1/util/translator/shared_types_test.go b/apis/v1beta1/util/translate/shared_types_test.go similarity index 98% rename from apis/v1beta1/util/translator/shared_types_test.go rename to apis/v1beta1/util/translate/shared_types_test.go index ba98514079..c449649915 100644 --- a/apis/v1beta1/util/translator/shared_types_test.go +++ b/apis/v1beta1/util/translate/shared_types_test.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package translator +package translate import ( "testing" diff --git a/apis/v1beta1/validation/httproute_test.go b/apis/v1beta1/validation/httproute_test.go index ed19c439a7..2aabad3fa9 100644 --- a/apis/v1beta1/validation/httproute_test.go +++ b/apis/v1beta1/validation/httproute_test.go @@ -25,7 +25,7 @@ import ( utilpointer "k8s.io/utils/pointer" gatewayv1b1 "sigs.k8s.io/gateway-api/apis/v1beta1" - "sigs.k8s.io/gateway-api/apis/v1beta1/util/translator" + "sigs.k8s.io/gateway-api/apis/v1beta1/util/translate" ) func TestValidateHTTPRoute(t *testing.T) { @@ -45,7 +45,7 @@ func TestValidateHTTPRoute(t *testing.T) { Matches: []gatewayv1b1.HTTPRouteMatch{ { Path: &gatewayv1b1.HTTPPathMatch{ - Type: translator.PathMatchTypePtr("PathPrefix"), + Type: translate.PathMatchTypePtr("PathPrefix"), Value: utilpointer.String("/"), }, }, @@ -55,7 +55,7 @@ func TestValidateHTTPRoute(t *testing.T) { BackendRef: gatewayv1b1.BackendRef{ BackendObjectReference: gatewayv1b1.BackendObjectReference{ Name: testService, - Port: translator.PortNumberPtr(8080), + Port: translate.PortNumberPtr(8080), }, Weight: utilpointer.Int32(100), }, @@ -71,7 +71,7 @@ func TestValidateHTTPRoute(t *testing.T) { Matches: []gatewayv1b1.HTTPRouteMatch{ { Path: &gatewayv1b1.HTTPPathMatch{ - Type: translator.PathMatchTypePtr("PathPrefix"), + Type: translate.PathMatchTypePtr("PathPrefix"), Value: utilpointer.String("/"), }, }, @@ -82,7 +82,7 @@ func TestValidateHTTPRoute(t *testing.T) { RequestMirror: &gatewayv1b1.HTTPRequestMirrorFilter{ BackendRef: gatewayv1b1.BackendObjectReference{ Name: testService, - Port: translator.PortNumberPtr(8081), + Port: translate.PortNumberPtr(8081), }, }, }, @@ -97,7 +97,7 @@ func TestValidateHTTPRoute(t *testing.T) { Matches: []gatewayv1b1.HTTPRouteMatch{ { Path: &gatewayv1b1.HTTPPathMatch{ - Type: translator.PathMatchTypePtr("PathPrefix"), + Type: translate.PathMatchTypePtr("PathPrefix"), Value: utilpointer.String("/"), }, }, @@ -108,7 +108,7 @@ func TestValidateHTTPRoute(t *testing.T) { RequestMirror: &gatewayv1b1.HTTPRequestMirrorFilter{ BackendRef: gatewayv1b1.BackendObjectReference{ Name: testService, - Port: translator.PortNumberPtr(8080), + Port: translate.PortNumberPtr(8080), }, }, }, @@ -117,7 +117,7 @@ func TestValidateHTTPRoute(t *testing.T) { RequestMirror: &gatewayv1b1.HTTPRequestMirrorFilter{ BackendRef: gatewayv1b1.BackendObjectReference{ Name: specialService, - Port: translator.PortNumberPtr(8080), + Port: translate.PortNumberPtr(8080), }, }, }, @@ -132,7 +132,7 @@ func TestValidateHTTPRoute(t *testing.T) { Matches: []gatewayv1b1.HTTPRouteMatch{ { Path: &gatewayv1b1.HTTPPathMatch{ - Type: translator.PathMatchTypePtr("PathPrefix"), + Type: translate.PathMatchTypePtr("PathPrefix"), Value: utilpointer.String("/"), }, }, @@ -154,7 +154,7 @@ func TestValidateHTTPRoute(t *testing.T) { RequestMirror: &gatewayv1b1.HTTPRequestMirrorFilter{ BackendRef: gatewayv1b1.BackendObjectReference{ Name: testService, - Port: translator.PortNumberPtr(8080), + Port: translate.PortNumberPtr(8080), }, }, }, @@ -180,7 +180,7 @@ func TestValidateHTTPRoute(t *testing.T) { Matches: []gatewayv1b1.HTTPRouteMatch{ { Path: &gatewayv1b1.HTTPPathMatch{ - Type: translator.PathMatchTypePtr("PathPrefix"), + Type: translate.PathMatchTypePtr("PathPrefix"), Value: utilpointer.String("/"), }, }, @@ -191,7 +191,7 @@ func TestValidateHTTPRoute(t *testing.T) { RequestMirror: &gatewayv1b1.HTTPRequestMirrorFilter{ BackendRef: gatewayv1b1.BackendObjectReference{ Name: testService, - Port: translator.PortNumberPtr(8080), + Port: translate.PortNumberPtr(8080), }, }, }, @@ -211,7 +211,7 @@ func TestValidateHTTPRoute(t *testing.T) { RequestMirror: &gatewayv1b1.HTTPRequestMirrorFilter{ BackendRef: gatewayv1b1.BackendObjectReference{ Name: testService, - Port: translator.PortNumberPtr(8080), + Port: translate.PortNumberPtr(8080), }, }, }, @@ -242,7 +242,7 @@ func TestValidateHTTPRoute(t *testing.T) { RequestMirror: &gatewayv1b1.HTTPRequestMirrorFilter{ BackendRef: gatewayv1b1.BackendObjectReference{ Name: specialService, - Port: translator.PortNumberPtr(8080), + Port: translate.PortNumberPtr(8080), }, }, }, @@ -268,7 +268,7 @@ func TestValidateHTTPRoute(t *testing.T) { Matches: []gatewayv1b1.HTTPRouteMatch{ { Path: &gatewayv1b1.HTTPPathMatch{ - Type: translator.PathMatchTypePtr("PathPrefix"), + Type: translate.PathMatchTypePtr("PathPrefix"), Value: utilpointer.String("/"), }, }, @@ -290,7 +290,7 @@ func TestValidateHTTPRoute(t *testing.T) { RequestMirror: &gatewayv1b1.HTTPRequestMirrorFilter{ BackendRef: gatewayv1b1.BackendObjectReference{ Name: testService, - Port: translator.PortNumberPtr(8080), + Port: translate.PortNumberPtr(8080), }, }, }, @@ -621,7 +621,7 @@ func TestValidateHTTPBackendUniqueFilters(t *testing.T) { BackendRef: gatewayv1b1.BackendRef{ BackendObjectReference: gatewayv1b1.BackendObjectReference{ Name: testService, - Port: translator.PortNumberPtr(8080), + Port: translate.PortNumberPtr(8080), }, Weight: utilpointer.Int32(100), }, @@ -631,7 +631,7 @@ func TestValidateHTTPBackendUniqueFilters(t *testing.T) { RequestMirror: &gatewayv1b1.HTTPRequestMirrorFilter{ BackendRef: gatewayv1b1.BackendObjectReference{ Name: testService, - Port: translator.PortNumberPtr(8080), + Port: translate.PortNumberPtr(8080), }, }, }, @@ -648,7 +648,7 @@ func TestValidateHTTPBackendUniqueFilters(t *testing.T) { BackendRef: gatewayv1b1.BackendRef{ BackendObjectReference: gatewayv1b1.BackendObjectReference{ Name: testService, - Port: translator.PortNumberPtr(8080), + Port: translate.PortNumberPtr(8080), }, }, Filters: []gatewayv1b1.HTTPRouteFilter{ @@ -657,7 +657,7 @@ func TestValidateHTTPBackendUniqueFilters(t *testing.T) { RequestMirror: &gatewayv1b1.HTTPRequestMirrorFilter{ BackendRef: gatewayv1b1.BackendObjectReference{ Name: testService, - Port: translator.PortNumberPtr(8080), + Port: translate.PortNumberPtr(8080), }, }, }, @@ -666,7 +666,7 @@ func TestValidateHTTPBackendUniqueFilters(t *testing.T) { RequestMirror: &gatewayv1b1.HTTPRequestMirrorFilter{ BackendRef: gatewayv1b1.BackendObjectReference{ Name: specialService, - Port: translator.PortNumberPtr(8080), + Port: translate.PortNumberPtr(8080), }, }, }, @@ -695,21 +695,21 @@ func TestValidateHTTPPathMatch(t *testing.T) { }{{ name: "invalid httpRoute prefix", path: &gatewayv1b1.HTTPPathMatch{ - Type: translator.PathMatchTypePtr("PathPrefix"), + Type: translate.PathMatchTypePtr("PathPrefix"), Value: utilpointer.String("/."), }, errCount: 1, }, { name: "invalid httpRoute Exact", path: &gatewayv1b1.HTTPPathMatch{ - Type: translator.PathMatchTypePtr("Exact"), + Type: translate.PathMatchTypePtr("Exact"), Value: utilpointer.String("/foo/./bar"), }, errCount: 1, }, { name: "invalid httpRoute prefix", path: &gatewayv1b1.HTTPPathMatch{ - Type: translator.PathMatchTypePtr("PathPrefix"), + Type: translate.PathMatchTypePtr("PathPrefix"), Value: utilpointer.String("/"), }, errCount: 0, @@ -726,7 +726,7 @@ func TestValidateHTTPPathMatch(t *testing.T) { BackendRef: gatewayv1b1.BackendRef{ BackendObjectReference: gatewayv1b1.BackendObjectReference{ Name: gatewayv1b1.ObjectName("test"), - Port: translator.PortNumberPtr(8080), + Port: translate.PortNumberPtr(8080), }, }, }}, @@ -787,7 +787,7 @@ func TestValidateHTTPHeaderMatches(t *testing.T) { BackendRef: gatewayv1b1.BackendRef{ BackendObjectReference: gatewayv1b1.BackendObjectReference{ Name: gatewayv1b1.ObjectName("test"), - Port: translator.PortNumberPtr(8080), + Port: translate.PortNumberPtr(8080), }, }, }}, @@ -851,7 +851,7 @@ func TestValidateHTTPQueryParamMatches(t *testing.T) { BackendRef: gatewayv1b1.BackendRef{ BackendObjectReference: gatewayv1b1.BackendObjectReference{ Name: gatewayv1b1.ObjectName("test"), - Port: translator.PortNumberPtr(8080), + Port: translate.PortNumberPtr(8080), }, }, }}, @@ -1008,7 +1008,7 @@ func TestValidateHTTPRouteTypeMatchesField(t *testing.T) { Kind: new(gatewayv1b1.Kind), Name: "name", Namespace: new(gatewayv1b1.Namespace), - Port: translator.PortNumberPtr(22), + Port: translate.PortNumberPtr(22), }}, }, errCount: 0, @@ -1114,7 +1114,7 @@ func TestValidateHTTPRouteTypeMatchesField(t *testing.T) { BackendRef: gatewayv1b1.BackendRef{ BackendObjectReference: gatewayv1b1.BackendObjectReference{ Name: gatewayv1b1.ObjectName("test"), - Port: translator.PortNumberPtr(8080), + Port: translate.PortNumberPtr(8080), }, }, }},