Hello,
I was wondering if someone could help me understand what is going on in the
following piece of code.
package main
import (
"fmt"
"reflect"
"unsafe"
)
func main() {
a := []byte("1234567")
printSliceDetails(a)
}
func printSliceDetails(a []byte) {
sliceHeader := (*reflect.SliceHeader)(uns
Example at: https://play.golang.org/p/d7HBrbZGo4
--
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
Hmm, interesting. However, wouldn't that mean that if I removed the
function and did the following: https://play.golang.org/p/enI6UmYoFJ the
escape analysis wouldn't happen?
On Wednesday, August 9, 2017 at 1:23:15 PM UTC+12, Marvin Renich wrote:
>
> * sno > [170808 20:57]
Thanks for the explanation.
On Wednesday, August 9, 2017 at 11:50:57 PM UTC+12, Marvin Renich wrote:
>
> [I'm subscribed; reply-to set.]
>
> * sno > [170808 21:34]:
> > Hmm, interesting. However, wouldn't that mean that if I removed the
> >