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

x/format: funcLitToLambdaExpr #2086

Merged
merged 1 commit into from
Jan 30, 2025
Merged

x/format: funcLitToLambdaExpr #2086

merged 1 commit into from
Jan 30, 2025

Conversation

visualfc
Copy link
Member

@visualfc visualfc commented Jan 29, 2025

format funclit to lambda expr

println(demo(func(n int) int {
	return n+100
}))

println(demo(func(n int) int {
	println(n)
	return n+100
}))

println(demo(func(n int) (v int) {
	return n+100
}))

demo2(300, func(n1, n2 int) int {
	return n1 + n2
})

demo2(300, func(int, int) int {
	println("hello")
	return 600
})

format to lambda ( skip named results )

println demo(n => n + 100)

println demo(n => {
	println n
	return n + 100
})

println demo(func(n int) (v int) {
	return n + 100
})

demo2 300, (n1, n2) => n1 + n2

demo2 300, (_, _) => {
	println "hello"
	return 600
}

Copy link

codecov bot commented Jan 29, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 93.03%. Comparing base (53962ba) to head (9b6a8ae).
Report is 12 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2086      +/-   ##
==========================================
+ Coverage   93.01%   93.03%   +0.02%     
==========================================
  Files          33       33              
  Lines       10843    10875      +32     
==========================================
+ Hits        10086    10118      +32     
  Misses        602      602              
  Partials      155      155              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@xushiwei xushiwei merged commit 70e7ad0 into goplus:main Jan 30, 2025
15 checks passed
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.

2 participants