mirror of
https://github.com/coredns/coredns.git
synced 2026-04-05 11:45:33 -04:00
lint(revive): fix unused-parameter violations (#7980)
This commit is contained in:
@@ -29,7 +29,7 @@ type treebuf struct {
|
||||
*bytes.Buffer
|
||||
}
|
||||
|
||||
func (t *treebuf) printFunc(e *tree.Elem, rrs map[uint16][]dns.RR) error {
|
||||
func (t *treebuf) printFunc(_e *tree.Elem, rrs map[uint16][]dns.RR) error {
|
||||
fmt.Fprintf(t.Buffer, "%v\n", rrs) // should be fixed order in new go versions.
|
||||
return nil
|
||||
}
|
||||
|
||||
@@ -181,7 +181,7 @@ func TestLookup(t *testing.T) {
|
||||
}
|
||||
}
|
||||
|
||||
func TestLookupNil(t *testing.T) {
|
||||
func TestLookupNil(_t *testing.T) {
|
||||
fm := File{Next: test.ErrorHandler(), Zones: Zones{Z: map[string]*Zone{testzone: nil}, Names: []string{testzone}}}
|
||||
ctx := context.TODO()
|
||||
|
||||
|
||||
@@ -138,7 +138,7 @@ func TestIsNotify(t *testing.T) {
|
||||
}
|
||||
}
|
||||
|
||||
func newRequest(zone string, qtype uint16) request.Request {
|
||||
func newRequest(_zone string, _qtype uint16) request.Request {
|
||||
m := new(dns.Msg)
|
||||
m.SetQuestion("example.com.", dns.TypeA)
|
||||
m.SetEdns0(4097, true)
|
||||
|
||||
@@ -137,7 +137,7 @@ func TestInsertPreservesSRVCase(t *testing.T) {
|
||||
}
|
||||
|
||||
found := false
|
||||
err = z.Walk(func(elem *tree.Elem, rrsets map[uint16][]dns.RR) error {
|
||||
err = z.Walk(func(_elem *tree.Elem, rrsets map[uint16][]dns.RR) error {
|
||||
for _, rrs := range rrsets {
|
||||
for _, rr := range rrs {
|
||||
if srvRR, ok := rr.(*dns.SRV); ok {
|
||||
|
||||
Reference in New Issue
Block a user