mirror of
				https://github.com/coredns/coredns.git
				synced 2025-10-30 17:53:21 -04:00 
			
		
		
		
	fix(plugin): nilness findings (#7556)
Enable nilness linter in govet. Plugin-by-plugin rationale: - plugin/transfer: reuse error instead of shadowing it inside the for loop by declaring "ret" outside of the loop - plugin/view: remove redundant err check - plugin/dnstap: avoid possible nil dereference in error reporting path in setup test - plugin/forward: prevent nil deference or empty-slice dereference on error paths in setup test Signed-off-by: Ville Vesilehto <ville@vesilehto.fi>
This commit is contained in:
		| @@ -111,7 +111,7 @@ func TestMultiDnstap(t *testing.T) { | ||||
| 	handlers := dnsserver.GetConfig(c).Handlers() | ||||
| 	d1, ok := handlers[0].(*Dnstap) | ||||
| 	if !ok { | ||||
| 		t.Fatalf("expected first plugin to be Dnstap, got %v", reflect.TypeOf(d1.Next)) | ||||
| 		t.Fatalf("expected first plugin to be Dnstap, got %v", reflect.TypeOf(handlers[0])) | ||||
| 	} | ||||
|  | ||||
| 	if d1.io.(*dio).endpoint != "dnstap1.sock" { | ||||
|   | ||||
		Reference in New Issue
	
	Block a user