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