mirror of
https://github.com/miekg/dns.git
synced 2025-10-13 19:01:01 +02:00
more special check for ipv4 needed anymore
This commit is contained in:
parent
769307b9ce
commit
abc2b880a1
@ -412,9 +412,6 @@ func printStructValue(val *reflect.StructValue) string {
|
|||||||
fval := val.Field(i)
|
fval := val.Field(i)
|
||||||
if fv, ok := fval.(*reflect.StructValue); ok {
|
if fv, ok := fval.(*reflect.StructValue); ok {
|
||||||
s += printStructValue(fv)
|
s += printStructValue(fv)
|
||||||
} else if fv, ok := fval.(*reflect.UintValue); ok && f.Tag == "ipv4" { // TODO ipv4 can go here
|
|
||||||
i := fv.Get()
|
|
||||||
s += net.IPv4(byte(i>>24), byte(i>>16), byte(i>>8), byte(i)).String()
|
|
||||||
} else {
|
} else {
|
||||||
s += fmt.Sprint(fval.Interface())
|
s += fmt.Sprint(fval.Interface())
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user