mirror of
				https://github.com/coredns/coredns.git
				synced 2025-11-03 18:53:13 -05:00 
			
		
		
		
	
		
			
	
	
		
			15 lines
		
	
	
		
			209 B
		
	
	
	
		
			Go
		
	
	
	
	
	
		
		
			
		
	
	
			15 lines
		
	
	
		
			209 B
		
	
	
	
		
			Go
		
	
	
	
	
	
| 
								 | 
							
								package middleware
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								import (
							 | 
						||
| 
								 | 
							
									"strconv"
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
									"github.com/miekg/dns"
							 | 
						||
| 
								 | 
							
								)
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								func RcodeToString(rcode int) string {
							 | 
						||
| 
								 | 
							
									if str, ok := dns.RcodeToString[rcode]; ok {
							 | 
						||
| 
								 | 
							
										return str
							 | 
						||
| 
								 | 
							
									}
							 | 
						||
| 
								 | 
							
									return "RCODE" + strconv.Itoa(rcode)
							 | 
						||
| 
								 | 
							
								}
							 |