Commit 8c6a494c authored by Jeromy's avatar Jeromy

better printing

parent 63857d12
......@@ -84,16 +84,14 @@ func (ptrn *pattern) String() string {
sub = append(sub, a.String())
}
var delim string
switch ptrn.Op {
case AND:
delim = ","
return strings.Join(sub, "/")
case OR:
delim = "|"
return "{" + strings.Join(sub, "|") + "}"
default:
panic("unrecognized pattern op!")
}
return "{ " + strings.Join(sub, delim) + " }"
}
type Base int
......
......@@ -7,6 +7,7 @@ import (
)
func assertMatches(t *testing.T, p Pattern, args ...[]string) {
t.Logf("testing assertions for %q", p)
for _, argset := range args {
for _, s := range argset {
addr, err := ma.NewMultiaddr(s)
......
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