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

Simplify stdlib function literals ("->", elide "return") #6

Open
wants to merge 1 commit into
base: release-branch.go1.23
Choose a base branch
from

Conversation

tmaxmax
Copy link
Owner

@tmaxmax tmaxmax commented Nov 14, 2024

found 7523 function literals, 4674 (62.1%) rewritten into lightweight form
1841 lightweight function literals (39.4%) are in test files
1946 lightweight function literals contain a single statement
        (from which 353, 18.1% are long)
721 lightweight function literals contain a single return statement
        (15.4% of all rewritten literals, 37.1% of single statement literals)
return value count histogram for single-return lightweight function literals:
        [0 638 81 2 0 0 0 0 0 0]

@tmaxmax tmaxmax self-assigned this Nov 14, 2024
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

Successfully merging this pull request may close these issues.

1 participant