You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The IsOpen here is from the gorm database model, by looking up the database, returning a []model.User list, and then one of the fields is IsOpen, a boolean type. If you pass the boolean type directly to the gin template, it will be recognized.
What version of Garble and Go are you using?
What environment are you running Garble on?
go env
OutputWhat did you do?
{{$prive := .priveall}} {{range $v := $prive}} {{if $v.IsOpen }}- {{$v.Title}}
{{end}}
{{end}}
What did you expect to see?
Use bool and other interface{} types in html templates.
What did you see instead?
Error with bool type in gin template rendering.
Error #1: template: test.html:14:11: executing "test.html" at <$v.IsOpen>: can't evaluate field IsOpen in type CC3Eu0GdG_jK.OSgLH1cBblg
The text was updated successfully, but these errors were encountered: