mirror of
				https://github.com/coredns/coredns.git
				synced 2025-10-30 17:53:21 -04:00 
			
		
		
		
	Cleanup the errors and removed deadcode along the way. The leaves some error laying around, mostly about commenting exported identifier. We should look hard if those really are needed.
		
			
				
	
	
		
			17 lines
		
	
	
		
			310 B
		
	
	
	
		
			Go
		
	
	
	
	
	
			
		
		
	
	
			17 lines
		
	
	
		
			310 B
		
	
	
	
		
			Go
		
	
	
	
	
	
| package rcode
 | |
| 
 | |
| import (
 | |
| 	"strconv"
 | |
| 
 | |
| 	"github.com/miekg/dns"
 | |
| )
 | |
| 
 | |
| // ToString convert the rcode to the offical 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)
 | |
| }
 |