Handle *string

This commit is contained in:
2025-02-08 18:36:36 +05:30
parent 0c7fd9a814
commit 62a63d786a
+6
View File
@@ -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