diff options
Diffstat (limited to 'vendor/github.com/miekg/dns/defaults.go')
-rw-r--r-- | vendor/github.com/miekg/dns/defaults.go | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/vendor/github.com/miekg/dns/defaults.go b/vendor/github.com/miekg/dns/defaults.go index c34890eec..14e18b0b3 100644 --- a/vendor/github.com/miekg/dns/defaults.go +++ b/vendor/github.com/miekg/dns/defaults.go @@ -273,8 +273,11 @@ func (t Type) String() string { // String returns the string representation for the class c. func (c Class) String() string { - if c1, ok := ClassToString[uint16(c)]; ok { - return c1 + if s, ok := ClassToString[uint16(c)]; ok { + // Only emit mnemonics when they are unambiguous, specically ANY is in both. + if _, ok := StringToType[s]; !ok { + return s + } } return "CLASS" + strconv.Itoa(int(c)) } |