Add a missing trailing 'e' to the encoding of maps
This commit is contained in:
parent
e1575d1fa3
commit
09515864db
2 changed files with 2 additions and 7 deletions
|
@ -83,6 +83,7 @@ func marshal(w io.Writer, data interface{}) error {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
fmt.Fprintf(w, "e")
|
||||||
|
|
||||||
case []string:
|
case []string:
|
||||||
fmt.Fprintf(w, "l")
|
fmt.Fprintf(w, "l")
|
||||||
|
|
|
@ -25,13 +25,7 @@ var tests = []struct {
|
||||||
{[]string{"one", "two"}, "l3:one3:twoe"},
|
{[]string{"one", "two"}, "l3:one3:twoe"},
|
||||||
{[]string{}, "le"},
|
{[]string{}, "le"},
|
||||||
|
|
||||||
{
|
{map[string]interface{}{"one": "aa", "two": "bb"}, "d3:one2:aa3:two2:bbe"},
|
||||||
map[string]interface{}{
|
|
||||||
"one": "aa",
|
|
||||||
"two": "bb",
|
|
||||||
},
|
|
||||||
"d3:one2:aa3:two2:bbe",
|
|
||||||
},
|
|
||||||
{map[string]interface{}{}, "de"},
|
{map[string]interface{}{}, "de"},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue