Fix quote function in template to render pointers properly

This commit is contained in:
m.nabokikh 2020-03-05 13:59:30 +04:00
parent 99419c75bc
commit ed30be05bc
2 changed files with 4 additions and 0 deletions

View file

@ -256,10 +256,12 @@ func TestFormatIP(t *testing.T) {
}
func TestQuote(t *testing.T) {
foo := "foo"
cases := map[interface{}]string{
"foo": `"foo"`,
"\"foo\"": `"\"foo\""`,
"foo\nbar": `"foo\nbar"`,
&foo: `"foo"`,
10: `"10"`,
}
for input, output := range cases {