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

21 lines
353 B
Plaintext

package testattrerrs
func funcWithNoError() (s string) {
return "OK"
}
func funcWithError(in error) (s string, err error) {
if in != nil {
return "", in
}
return "OK2", nil
}
templ TestComponent(err error) {
<ul>
<li data-attr={ "raw" }></li>
<li data-attr={ funcWithNoError() }></li>
<li data-attr={ funcWithError(err) }></li>
</ul>
}