mirror of
				https://github.com/coredns/coredns.git
				synced 2025-10-31 10:13:14 -04:00 
			
		
		
		
	Add middleware.NextOrFailure (#462)
This checks if the next middleware to be called is nil, and if so returns ServerFailure and an error. This makes the next calling more robust and saves some lines of code. Also prefix the error with the name of the middleware to aid in debugging.
This commit is contained in:
		| @@ -8,7 +8,7 @@ import ( | ||||
| 	"github.com/miekg/dns" | ||||
| ) | ||||
|  | ||||
| // PorseHostPortOrFile parses the strings in s, each string can either be a address, | ||||
| // ParseHostPortOrFile parses the strings in s, each string can either be a address, | ||||
| // address:port or a filename. The address part is checked and the filename case a | ||||
| // resolv.conf like file is parsed and the nameserver found are returned. | ||||
| func ParseHostPortOrFile(s ...string) ([]string, error) { | ||||
|   | ||||
		Reference in New Issue
	
	Block a user