mirror of
https://github.com/coredns/coredns.git
synced 2025-10-27 16:24:19 -04:00
deprecate Normalize and MustNormalize (#4648)
* deprecate normalize and mustnormalize Signed-off-by: Chris O'Haver <cohaver@infoblox.com> * add runtime warning Signed-off-by: Chris O'Haver <cohaver@infoblox.com> * elaborate runtime warning Signed-off-by: Chris O'Haver <cohaver@infoblox.com> * include caller info Signed-off-by: Chris O'Haver <cohaver@infoblox.com>
This commit is contained in:
@@ -71,7 +71,7 @@ func TestNameNormalize(t *testing.T) {
|
||||
}
|
||||
}
|
||||
|
||||
func TestHostNormalize(t *testing.T) {
|
||||
func TestHostNormalizeExact(t *testing.T) {
|
||||
tests := []struct {
|
||||
in string
|
||||
out []string
|
||||
@@ -85,7 +85,7 @@ func TestHostNormalize(t *testing.T) {
|
||||
}
|
||||
|
||||
for i := range tests {
|
||||
actual := Host(tests[i].in).Normalize()
|
||||
actual := Host(tests[i].in).NormalizeExact()
|
||||
expected := tests[i].out
|
||||
sort.Strings(expected)
|
||||
for j := range expected {
|
||||
|
||||
Reference in New Issue
Block a user