SyntaxFix
Write A Post
Hire A Developer
Questions
Sometimes, I try to use anonymous function to achieve defining and assigning happen at the same line. like below:
a, b = 4, 8 c := func() int { if a >b { return a } return b } ()
https://play.golang.org/p/rMjqytMYeQ0