mirror of
https://github.com/coredns/coredns.git
synced 2025-11-01 10:43:17 -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:
13
plugin/file/wildcard.go
Normal file
13
plugin/file/wildcard.go
Normal file
@@ -0,0 +1,13 @@
|
||||
package file
|
||||
|
||||
import "github.com/miekg/dns"
|
||||
|
||||
// replaceWithWildcard replaces the left most label with '*'.
|
||||
func replaceWithAsteriskLabel(qname string) (wildcard string) {
|
||||
i, shot := dns.NextLabel(qname, 0)
|
||||
if shot {
|
||||
return ""
|
||||
}
|
||||
|
||||
return "*." + qname[i:]
|
||||
}
|
||||
Reference in New Issue
Block a user