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:
parent
b984aa4559
commit
d8714e64e4
354 changed files with 974 additions and 969 deletions
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)
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue