learnlytics-go/templ/generator/test-context/template.templ
2025-03-20 12:35:13 +01:00

20 lines
426 B
Plaintext

package testcontext
type contextKey string
var contextKeyName contextKey = "name"
templ render() {
<ul>
<li>{ ctx.Value(contextKeyName).(string) }</li>
if ctx.Value(contextKeyName).(string) == "test" {
<li>the if passed</li>
}
if ctx.Value(contextKeyName).(string) != "test" {
<li>the else if failed</li>
} else if ctx.Value(contextKeyName).(string) == "test" {
<li>the else if passed</li>
}
</ul>
}