lint(revive): fix unused-parameter violations (#7980)

This commit is contained in:
Ville Vesilehto
2026-03-30 03:02:20 +03:00
committed by GitHub
parent 6af8fd46fe
commit 6720959b8b
95 changed files with 245 additions and 244 deletions

View File

@@ -47,7 +47,7 @@ type zones map[string][]*zone
// that each domain name/zone id pair does exist, and returns a new *CloudDNS.
// In addition to this, upstream is passed for doing recursive queries against CNAMEs.
// Returns error if it cannot verify any given domain name/zone id pair.
func New(ctx context.Context, c gcpDNS, keys map[string][]string, up *upstream.Upstream) (*CloudDNS, error) {
func New(_ctx context.Context, c gcpDNS, keys map[string][]string, up *upstream.Upstream) (*CloudDNS, error) {
zones := make(map[string][]*zone, len(keys))
zoneNames := make([]string, 0, len(keys))
for dnsName, hostedZoneDetails := range keys {

View File

@@ -22,11 +22,11 @@ type fakeGCPClient struct {
*gcp.Service
}
func (c fakeGCPClient) zoneExists(projectName, hostedZoneName string) error {
func (c fakeGCPClient) zoneExists(_projectName, _hostedZoneName string) error {
return nil
}
func (c fakeGCPClient) listRRSets(ctx context.Context, projectName, hostedZoneName string) (*gcp.ResourceRecordSetsListResponse, error) {
func (c fakeGCPClient) listRRSets(_ctx context.Context, projectName, hostedZoneName string) (*gcp.ResourceRecordSetsListResponse, error) {
if projectName == "bad-project" || hostedZoneName == "bad-zone" {
return nil, errors.New("the 'parameters.managedZone' resource named 'bad-zone' does not exist")
}
@@ -148,7 +148,7 @@ func TestCloudDNS(t *testing.T) {
}
r.Fall = fall.Zero
r.Fall.SetZonesFromArgs([]string{"gov."})
r.Next = test.HandlerFunc(func(ctx context.Context, w dns.ResponseWriter, r *dns.Msg) (int, error) {
r.Next = test.HandlerFunc(func(_ctx context.Context, w dns.ResponseWriter, r *dns.Msg) (int, error) {
state := request.Request{W: w, Req: r}
qname := state.Name()
m := new(dns.Msg)

View File

@@ -13,7 +13,7 @@ import (
)
func TestSetupCloudDNS(t *testing.T) {
f = func(ctx context.Context, opt option.ClientOption) (gcpDNS, error) {
f = func(_ctx context.Context, _opt option.ClientOption) (gcpDNS, error) {
return fakeGCPClient{}, nil
}