|
|
|
|
|
by prodigal_erik
3521 days ago
|
|
The trouble with "go foo()" is that it's fire-and-forget; foo's return value is literally discarded. When you need to know what happened (which should be nearly always), foo and every caller all have to opt-in to passing any result and/or error and/or panic value over a channel or something. It's one of many places where Go gives you tiny pieces of the right thing and makes you assemble them yourself. |
|
In saying that though, if you have to do it a lot it probably means some of those functions should have been synchronous in the first place.