how will you pass parameters if its defer fn?
On Sunday, January 28, 2018 at 3:42:03 AM UTC+1, Flying wrote:
>
> example :
> fn := func() {
> fmt.Println(10)
> }
> defer fn()
>
>
> my question is why use defer fn() not defer fn
>
>
> when we use fn() here doesn't it mean call it now ???
>
--
You received this message because you are subscribed to the Google Groups
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.