On Tue, Apr 18, 2017 at 11:13 PM st ov <so.qu...@gmail.com> wrote: > I read everything is pass-by-value in Go, is that correct? > What does it encompass? Are there any exceptions? > > Does that mean the following: > > int passes full integer byte value > float64 passes full float byte value > string passes full string []byte value
less, string is a 2 word value (struct) > slice passes pointer value to slice in memory more, slice is a 3 word value (struct) > map passes pointer value to map in memory > func passes pointer value to func in memory yes - in the first approximation > interface passes pointer value to interface object in memory more, interface is a 2 word value (struct) -- -j -- 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 golang-nuts+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.