fix: linter on unused parameter

This commit is contained in:
Michel Loiseleur 2024-05-16 08:44:06 +02:00
parent ae2978527a
commit 9597d257a7
2 changed files with 3 additions and 3 deletions

View File

@ -164,7 +164,7 @@ func (sc *ambassadorHostSource) Endpoints(ctx context.Context) ([]*endpoint.Endp
} }
// endpointsFromHost extracts the endpoints from a Host object // endpointsFromHost extracts the endpoints from a Host object
func (sc *ambassadorHostSource) endpointsFromHost(ctx context.Context, host *ambassador.Host, targets endpoint.Targets) ([]*endpoint.Endpoint, error) { func (sc *ambassadorHostSource) endpointsFromHost(_ context.Context, host *ambassador.Host, targets endpoint.Targets) ([]*endpoint.Endpoint, error) {
var endpoints []*endpoint.Endpoint var endpoints []*endpoint.Endpoint
annotations := host.Annotations annotations := host.Annotations
@ -193,7 +193,7 @@ func (sc *ambassadorHostSource) targetsFromAmbassadorLoadBalancer(ctx context.Co
return nil, err return nil, err
} }
var targets = extractLoadBalancerTargets(svc, false) targets := extractLoadBalancerTargets(svc, false)
return targets, nil return targets, nil
} }

View File

@ -56,7 +56,7 @@ func objBody(codec runtime.Encoder, obj runtime.Object) io.ReadCloser {
return io.NopCloser(bytes.NewReader([]byte(runtime.EncodeOrDie(codec, obj)))) return io.NopCloser(bytes.NewReader([]byte(runtime.EncodeOrDie(codec, obj))))
} }
func fakeRESTClient(endpoints []*endpoint.Endpoint, apiVersion, kind, namespace, name string, annotations map[string]string, labels map[string]string, t *testing.T) rest.Interface { func fakeRESTClient(endpoints []*endpoint.Endpoint, apiVersion, kind, namespace, name string, annotations map[string]string, labels map[string]string, _ *testing.T) rest.Interface {
groupVersion, _ := schema.ParseGroupVersion(apiVersion) groupVersion, _ := schema.ParseGroupVersion(apiVersion)
scheme := runtime.NewScheme() scheme := runtime.NewScheme()
addKnownTypes(scheme, groupVersion) addKnownTypes(scheme, groupVersion)