mmcgrana / gobyexample

Go by Example
https://gobyexample.com
7.16k stars 1.26k forks source link

Updated Closure instruction #542

Closed amaddio closed 1 month ago

amaddio commented 1 month ago

Added explanation that one has to align return types. It wasn't clear to me that not only a function but also the return types of that very function have to be specified. It is clear when you know it. But as a Go beginner you could stumble over it, expecially when you start using multiple return types e.g. (int, error)