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) { }