Hi,
Please help me understand the below:
I got this from "The Zoo of Go Functions"
type Count int
func (c *Count) Incr() int {
*c = *c + 1 //why use *c and not just c, based on (c *Count) c is already
a pointer?
return int(*c) //why cast to int, c is already of type int?
}
Christof
--
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].
To view this discussion on the web visit
https://groups.google.com/d/msgid/golang-nuts/47bb77be-9634-47cb-9899-3bb07328ee50o%40googlegroups.com.