mirror of
				https://github.com/coredns/coredns.git
				synced 2025-10-30 17:53:21 -04:00 
			
		
		
		
	Remove the word middleware (#1067)
* Rename middleware to plugin first pass; mostly used 'sed', few spots where I manually changed text. This still builds a coredns binary. * fmt error * Rename AddMiddleware to AddPlugin * Readd AddMiddleware to remain backwards compat
This commit is contained in:
		
							
								
								
									
										16
									
								
								plugin/pkg/rcode/rcode.go
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										16
									
								
								plugin/pkg/rcode/rcode.go
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,16 @@ | ||||
| package rcode | ||||
|  | ||||
| import ( | ||||
| 	"strconv" | ||||
|  | ||||
| 	"github.com/miekg/dns" | ||||
| ) | ||||
|  | ||||
| // ToString convert the rcode to the official DNS string, or to "RCODE"+value if the RCODE | ||||
| // value is unknown. | ||||
| func ToString(rcode int) string { | ||||
| 	if str, ok := dns.RcodeToString[rcode]; ok { | ||||
| 		return str | ||||
| 	} | ||||
| 	return "RCODE" + strconv.Itoa(rcode) | ||||
| } | ||||
		Reference in New Issue
	
	Block a user