4 ms·
Sidenote: if you really need compile-time safety for errors, you can always use your function signature to achieve this. func DoThing(onFoo func(), onBar fun
by iamcalledrob 9mo ago
Sidenote: if you really need compile-time safety for errors, you can always use your function signature to achieve this.
func DoThing(onFoo func(), onBar func()) { ... }
It's a bit horrible, but does solve for the rare occasion when certain scenarios must be handled, and makes it clear that the change is a breaking one. Personally never needed this though.