Defer defers the esecutiin of the following expression, but not the evaluation
of the arguments.
So "defer fn(a==1)" will call fn when this function exists, with a bool that is
true iff a _was_ 1 when the defer was registered.
--
You received this message because you are subscribed to the Googl
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