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
text/template: fix truth handling of typed interface nils in if and with
Before this commit, the two logically equivalent conditionals below would produce different output:
{{ if not .NonEmptyInterfaceTypedNil }}OK{{ else }}{{ end }}
{{ if .NonEmptyInterfaceTypedNil }}{{ else }}OK{{ end }}
The functions `not`, `or`, and `and` all use the same `truth` function, which unwraps any concrete interface value before passing it to `isTrue`.
`if` and `with` also use `isTrue` to establish truth, but was missing the interface indirect call.
Fixes#30501
0 commit comments