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

21 lines
322 B
Plaintext

package teststringerrs
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>{ "raw" }</li>
<li>{ funcWithNoError() }</li>
<li>{ funcWithError(err) }</li>
</ul>
}