Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
mf
go-multiaddr-fmt
Commits
7e4bda62
Commit
7e4bda62
authored
Sep 18, 2019
by
Steven Allen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: add /dns support to the DNS pattern
parent
efc032fa
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
2 deletions
+3
-2
patterns.go
patterns.go
+2
-1
patterns_test.go
patterns_test.go
+1
-1
No files found.
patterns.go
View file @
7e4bda62
...
...
@@ -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
,
...
...
patterns_test.go
View file @
7e4bda62
...
...
@@ -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"
:
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment