Commit 7e4bda62 authored by Steven Allen's avatar Steven Allen

feat: add /dns support to the DNS pattern

parent efc032fa
......@@ -12,8 +12,9 @@ var DNS4 = Base(ma.P_DNS4)
// Define a dns6 format multiaddr
var DNS6 = Base(ma.P_DNS6)
// Define a dnsaddr, dns4 or dns6 format multiaddr
// Define a dnsaddr, dns, dns4 or dns6 format multiaddr
var DNS = Or(
Base(ma.P_DNS),
Base(ma.P_DNSADDR),
DNS4,
DNS6,
......
......@@ -57,7 +57,7 @@ var TestVectors = map[string]*testVector{
},
"DNS": {
Pattern: DNS,
Good: []string{"/dnsaddr/example.io", "/dns4/example.io", "/dns6/example.io"},
Good: []string{"/dnsaddr/example.io", "/dns4/example.io", "/dns6/example.io", "/dns/exmaple.io"},
Bad: []string{"/ip4/127.0.0.1"},
},
"WebRTCDirect": {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment