Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Return nil instead of nil value #991

Open
marcelloh opened this issue Nov 6, 2024 · 1 comment
Open

Return nil instead of nil value #991

marcelloh opened this issue Nov 6, 2024 · 1 comment

Comments

@marcelloh
Copy link

Describe the bug
It's not really a bug, but more of a "thing to do, when coding in Go"

In the generated code, there is a lot of:

		if templ_7745c5c3_Err != nil {
			return templ_7745c5c3_Err
		}
		return templ_7745c5c3_Err

but it is more idiomatic to return just nil, like this:

		if templ_7745c5c3_Err != nil {
			return templ_7745c5c3_Err
		}
		return nil
@a-h
Copy link
Owner

a-h commented Nov 6, 2024

I'd take a PR for that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants