Handle *string
This commit is contained in:
parent
0c7fd9a814
commit
62a63d786a
@ -294,6 +294,12 @@ func (nest *TemplateNest) Render(toRender interface{}) (string, error) {
|
||||
case bool:
|
||||
return fmt.Sprintf("%t", v), nil
|
||||
|
||||
case *string:
|
||||
if v == nil {
|
||||
return "", nil
|
||||
}
|
||||
return nest.Render(*v)
|
||||
|
||||
case string:
|
||||
if nest.option.NoEscapeInput {
|
||||
return v, nil
|
||||
|
Loading…
Reference in New Issue
Block a user