Re: [go-nuts] why my program will panic?

2018-08-14 Thread sheepbao
Thank you for your detailed answer.
I thought it would crash in this line (b.Z = "zz") of code. But it dose not 
happen and the program print "zz".
I don't understand why this program crash in return, not in b.Z = "zz". 
Because I agree with your opinion,  The field Z of (*b) is beyond the 
memory that was allocated 
on the heap or reserved on the stack for a.

On Tuesday, August 14, 2018 at 9:57:05 PM UTC+8, Marvin Renich wrote:
>
> * sheepbao > [180813 23:45]: 
> > go version 
> > go version go1.10.2 darwin/amd64 
> > 
> > test code: 
> > 
> > func TestPoint(t *testing.T) { 
> > type A struct { 
> > X int 
> > Y string 
> > } 
> > type B struct { 
> > X int 
> > Y string 
> > Z string 
> > } 
> > 
> > a := A{X: 2, Y: "yy"} 
> > b := (*B)(unsafe.Pointer()) 
> > b.Z = "zz" 
> > 
> > fmt.Printf(" z: %v\n", b.Z) 
> > return 
> > } 
>
> Enough bytes are allocated for a (of type A).  It doesn't matter whether 
> they are on the stack or on the heap.  Now you use unsafe to make b a 
> pointer to type B that points to the same memory location where a was 
> allocated.  The field Z of (*b) is beyond the memory that was allocated 
> on the heap or reserved on the stack for a.  Neither the compiler (for 
> stack-reserved a) nor the runtime (for heap-allocated a) has made any 
> provision for ensuring that the memory immediately beyond a is not used 
> for anything else.  Writing to b.Z overwrites memory to which b has no 
> claim. 
>
> Both this code and the change in your subsequent message are simply 
> wrong.  Whether it crashes or not depends on the legitimate "owner" of 
> the memory at b.Z.  If it is a return address on the stack, a crash is 
> almost certain.  If it is memory on the heap that has not been allocated 
> yet, and will never be allocated in such a simple program, you might not 
> see any evidence that the code was written incorrectly. 
>
> ...Marvin 
>
>

-- 
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.


Re: [go-nuts] why my program will panic?

2018-08-13 Thread sheepbao
I just want to research how golang func stack work. 

On Tuesday, August 14, 2018 at 12:46:59 PM UTC+8, kortschak wrote:
>
> Why would you expect this to work? 
>
> On Mon, 2018-08-13 at 20:44 -0700, sheepbao wrote: 
> > go version 
> > go version go1.10.2 darwin/amd64 
> > 
> > test code: 
> > 
> > func TestPoint(t *testing.T) { 
> > type A struct { 
> > X int 
> > Y string 
> > } 
> > type B struct { 
> > X int 
> > Y string 
> > Z string 
> > } 
> > 
> > a := A{X: 2, Y: "yy"} 
> > b := (*B)(unsafe.Pointer()) 
> > b.Z = "zz" 
> > 
> > fmt.Printf(" z: %v\n", b.Z) 
> > return 
> > } 
> > 
> >   
> > 
> > panic info: 
> > === RUN TestPoint 
> > z: zz 
> > runtime: unexpected return pc for runtime.sigpanic called from 0x2 
> > stack: frame={sp:0xc42004cf58, fp:0xc42004cfa8}  
> > stack=[0xc42004c000,0xc42004d000) 
> > 00c42004ce58: 00c42004ce88 010514bb 
> >   
> > 00c42004ce68: 00c4200c00f0 00c4200b8020  
> > 00c42004ce78: 0007 0020  
> > 00c42004ce88: 00c42004cf28 01027ee9 
> >   
> > 00c42004ce98:  01136758  
> > 00c42004cea8: 00c42008e6b0 00080008  
> > 00c42004ceb8:  00c420033720  
> > 00c42004cec8: 010973c2  00c420066600  
> > 00c42004ced8: 00c42009a008 00c42008e6a0  
> > 00c42004cee8: 00c42008e680 00c420066628  
> > 00c42004cef8: 00c420066620 00c42004ce68  
> > 00c42004cf08: 01108ea0 011d4f80  
> > 00c42004cf18:  0001  
> > 00c42004cf28: 00c42004cf48 01026f5e 
> >   
> > 00c42004cf38: 01108ea0 011d4f80  
> > 00c42004cf48: 00c42004cf98 0103b7aa 
> >   
> > 00c42004cf58: <00c420066600 0001  
> > 00c42004cf68:  010fe240  
> > 00c42004cf78: 00c420082460 00c420066600  
> > 00c42004cf88: 0112d8f6 0002  
> > 00c42004cf98: 0112d8f8 !0002  
> > 00c42004cfa8: >00c4200c00f0 000aace2  
> > 00c42004cfb8: 011dc160   
> > 00c42004cfc8: 01053ac1  
> > 00c4200c00f0  
> > 00c42004cfd8: 01136150   
> > 00c42004cfe8:    
> > 00c42004cff8:   
> > fatal error: unknown caller pc 
> > 
> > runtime stack: 
> > runtime.throw(0x112fd13, 0x11) 
> > /Users/bao/Documents/reading/golang/go1.10.2/src/runtime/panic.go 
> > :616  
> > +0x81 
> > runtime.gentraceback(0x, 0x, 0x0,  
> > 0xc420066600, 0x0, 0x0, 0x7fff, 0x1136348, 0x7ffeefbff088, 0x0, 
> > ...) 
> > /Users/bao/Documents/reading/golang/go1.10.2/src/runtime/tracebac 
> > k.go:257  
> > +0x1bdb 
> > runtime.copystack(0xc420066600, 0x1000, 0x1) 
> > /Users/bao/Documents/reading/golang/go1.10.2/src/runtime/stack.go 
> > :891  
> > +0x270 
> > runtime.newstack() 
> > /Users/bao/Documents/reading/golang/go1.10.2/src/runtime/stack.go 
> > :1063  
> > +0x30f 
> > runtime.morestack() 
> > /Users/bao/Documents/reading/golang/go1.10.2/src/runtime/asm_amd6 
> > 4.s:492  
> > +0x89 
> > 
> > goroutine 19 [copystack]: 
> > fmt.(*pp).argNumber(0xc4200c6000, 0x0, 0x112db26, 0x5, 0x1, 0x1, 0x0, 
> > 0x0,  
> > 0x0) 
> > /Users/bao/Documents/reading/golang/go1.10.2/src/fmt/print.go:926 
> >   
> > +0x112 fp=0xc42004cb48 sp=0xc42004cb40 pc=0x109d9a2 
> > fmt.(*pp).doPrintf(0xc4200c6000, 0x112db26, 0x5, 0xc42004ccc8, 0x1, 
> > 0x1) 
> > /Users/bao/Documents/reading/golang/go1.10.2/src/fmt/print.go:101 
> > 4  
> > +0x1ca fp=0xc42004cc30 sp=0xc42004cb48 pc=0x109deba 
> > fmt.Sprintf(0x112db26, 0x5, 0xc4200334c8, 0x1, 0x1, 0xc42008e6d8,  
> > 0xc42008e6e0) 
> > /Users/bao/Documents/reading/golang/go1.10.2/src/fmt/print.go:203 
> > +0x66  
> > fp=0xc42004cc88 sp=0xc42004cc30 pc=0x1097466 
> > testing.fmtDuration(0xa388, 0x3, 0xc420026570) 
> > /Users/bao/Documents/reading/golang/go1.10.2/src/testing/testing. 
> > go:438  
> > +0xdf fp=0xc42004cce8 sp=0xc42004cc88 pc=0x10ae90f 
> > testing.(*T).repo

[go-nuts] Re: why my program will panic?

2018-08-13 Thread sheepbao
and I change one line code, than program does not panic.


func TestPoint(t *testing.T) {
type A struct {
X int
Y string
}
type B struct {
X int
Y string
Z string
}

a := A{X: 2, Y: "yy"}
b := (*B)(unsafe.Pointer())
b.Z = "zz"

// fmt.Printf(" z: %v\n", b.Z)
fmt.Printf(" z: %v\n", ) // a move to heap
return
} 


-- 
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.


[go-nuts] why my program will panic?

2018-08-13 Thread sheepbao
go version
go version go1.10.2 darwin/amd64

test code:

func TestPoint(t *testing.T) {
type A struct {
X int
Y string
}
type B struct {
X int
Y string
Z string
}

a := A{X: 2, Y: "yy"}
b := (*B)(unsafe.Pointer())
b.Z = "zz"

fmt.Printf(" z: %v\n", b.Z)
return
}

 

panic info:
=== RUN TestPoint
z: zz
runtime: unexpected return pc for runtime.sigpanic called from 0x2
stack: frame={sp:0xc42004cf58, fp:0xc42004cfa8} 
stack=[0xc42004c000,0xc42004d000)
00c42004ce58: 00c42004ce88 010514bb  
00c42004ce68: 00c4200c00f0 00c4200b8020 
00c42004ce78: 0007 0020 
00c42004ce88: 00c42004cf28 01027ee9  
00c42004ce98:  01136758 
00c42004cea8: 00c42008e6b0 00080008 
00c42004ceb8:  00c420033720 
00c42004cec8: 010973c2  00c420066600 
00c42004ced8: 00c42009a008 00c42008e6a0 
00c42004cee8: 00c42008e680 00c420066628 
00c42004cef8: 00c420066620 00c42004ce68 
00c42004cf08: 01108ea0 011d4f80 
00c42004cf18:  0001 
00c42004cf28: 00c42004cf48 01026f5e  
00c42004cf38: 01108ea0 011d4f80 
00c42004cf48: 00c42004cf98 0103b7aa  
00c42004cf58: <00c420066600 0001 
00c42004cf68:  010fe240 
00c42004cf78: 00c420082460 00c420066600 
00c42004cf88: 0112d8f6 0002 
00c42004cf98: 0112d8f8 !0002 
00c42004cfa8: >00c4200c00f0 000aace2 
00c42004cfb8: 011dc160  
00c42004cfc8: 01053ac1  00c4200c00f0 
00c42004cfd8: 01136150  
00c42004cfe8:   
00c42004cff8:  
fatal error: unknown caller pc

runtime stack:
runtime.throw(0x112fd13, 0x11)
/Users/bao/Documents/reading/golang/go1.10.2/src/runtime/panic.go:616 
+0x81
runtime.gentraceback(0x, 0x, 0x0, 
0xc420066600, 0x0, 0x0, 0x7fff, 0x1136348, 0x7ffeefbff088, 0x0, ...)
/Users/bao/Documents/reading/golang/go1.10.2/src/runtime/traceback.go:257 
+0x1bdb
runtime.copystack(0xc420066600, 0x1000, 0x1)
/Users/bao/Documents/reading/golang/go1.10.2/src/runtime/stack.go:891 
+0x270
runtime.newstack()
/Users/bao/Documents/reading/golang/go1.10.2/src/runtime/stack.go:1063 
+0x30f
runtime.morestack()
/Users/bao/Documents/reading/golang/go1.10.2/src/runtime/asm_amd64.s:492 
+0x89

goroutine 19 [copystack]:
fmt.(*pp).argNumber(0xc4200c6000, 0x0, 0x112db26, 0x5, 0x1, 0x1, 0x0, 0x0, 
0x0)
/Users/bao/Documents/reading/golang/go1.10.2/src/fmt/print.go:926 
+0x112 fp=0xc42004cb48 sp=0xc42004cb40 pc=0x109d9a2
fmt.(*pp).doPrintf(0xc4200c6000, 0x112db26, 0x5, 0xc42004ccc8, 0x1, 0x1)
/Users/bao/Documents/reading/golang/go1.10.2/src/fmt/print.go:1014 
+0x1ca fp=0xc42004cc30 sp=0xc42004cb48 pc=0x109deba
fmt.Sprintf(0x112db26, 0x5, 0xc4200334c8, 0x1, 0x1, 0xc42008e6d8, 
0xc42008e6e0)
/Users/bao/Documents/reading/golang/go1.10.2/src/fmt/print.go:203 +0x66 
fp=0xc42004cc88 sp=0xc42004cc30 pc=0x1097466
testing.fmtDuration(0xa388, 0x3, 0xc420026570)
/Users/bao/Documents/reading/golang/go1.10.2/src/testing/testing.go:438 
+0xdf fp=0xc42004cce8 sp=0xc42004cc88 pc=0x10ae90f
testing.(*T).report(0xc4200c00f0)
/Users/bao/Documents/reading/golang/go1.10.2/src/testing/testing.go:997 
+0x57 fp=0xc42004cdf8 sp=0xc42004cce8 pc=0x10afcf7
testing.tRunner.func1(0xc4200c00f0)
/Users/bao/Documents/reading/golang/go1.10.2/src/testing/testing.go:741 
+0x285 fp=0xc42004ce68 sp=0xc42004cdf8 pc=0x10b2e75
runtime.call32(0x0, 0x1136758, 0xc42008e6b0, 0x80008)
/Users/bao/Documents/reading/golang/go1.10.2/src/runtime/asm_amd64.s:585 
+0x3b fp=0xc42004ce98 sp=0xc42004ce68 pc=0x10514bb
panic(0x1108ea0, 0x11d4f80)
/Users/bao/Documents/reading/golang/go1.10.2/src/runtime/panic.go:502 
+0x229 fp=0xc42004cf38 sp=0xc42004ce98 pc=0x1027ee9
runtime.panicmem()
/Users/bao/Documents/reading/golang/go1.10.2/src/runtime/panic.go:63 
+0x5e fp=0xc42004cf58 sp=0xc42004cf38 pc=0x1026f5e
runtime: unexpected return pc for runtime.sigpanic called from 0x2
stack: frame={sp:0xc42004cf58, fp:0xc42004cfa8} 
stack=[0xc42004c000,0xc42004d000)
00c42004ce58: 00c42004ce88 010514bb  
00c42004ce68: 00c4200c00f0 00c4200b8020 
00c42004ce78: 0007 0020 
00c42004ce88: 00c42004cf28 01027ee9  
00c42004ce98:  01136758 
00c42004cea8: 00c42008e6b0 00080008 
00c42004ceb8:  00c420033720 
00c42004cec8: 010973c2  00c420066600 
00c42004ced8: 00c42009a008 00c42008e6a0 
00c42004cee8: 00c42008e680 00c420066628 
00c42004cef8: 

[go-nuts] what does 'go.info,go.range' mean in golang asm?

2018-01-18 Thread sheepbao
I wrote this code add.go:
package asm

func add(a, b int) int {
   return a + b
}

then I compile this code to asm:
go tool compile -S add.go
the output is:
"".add STEXT nosplit size=19 args=0x18 locals=0x0
   0x 0 (add.go:3) TEXT"".add(SB), NOSPLIT, $0-24
   0x 0 (add.go:3) FUNCDATA$0, gclocals·
54241e171da8af6ae173d69da0236748(SB)
   0x 0 (add.go:3) FUNCDATA$1, gclocals·
33cdeebe80329f1fdbee7f5874cb(SB)
   0x 0 (add.go:3) MOVQ"".b+16(SP), AX
   0x0005 5 (add.go:3) MOVQ"".a+8(SP), CX
   0x000a 00010 (add.go:4) ADDQCX, AX
   0x000d 00013 (add.go:4) MOVQAX, "".~r2+24(SP)
   0x0012 00018 (add.go:4) RET
   0x 48 8b 44 24 10 48 8b 4c 24 08 48 01 c8 48 89 44  H.D$.H.L$.H..H.D
   0x0010 24 18 c3 $..
go.info."".add SDWARFINFO size=63
   0x 02 22 22 2e 61 64 64 00 00 00 00 00 00 00 00 00  ."".add.
   0x0010 00 00 00 00 00 00 00 00 01 9c 01 05 61 00 01 9c  a...
   0x0020 00 00 00 00 05 62 00 04 9c 11 08 22 00 00 00 00  .b."
   0x0030 05 7e 72 32 00 04 9c 11 10 22 00 00 00 00 00 .~r2.".
   rel 8+8 t=1 "".add+0
   rel 16+8 t=1 "".add+19
   rel 32+4 t=28 go.info.int+0
   rel 44+4 t=28 go.info.int+0
   rel 58+4 t=28 go.info.int+0
go.range."".add SDWARFRANGE size=0
gclocals·54241e171da8af6ae173d69da0236748 SRODATA dupok size=9
   0x 01 00 00 00 03 00 00 00 00   .
gclocals·33cdeebe80329f1fdbee7f5874cb SRODATA dupok size=8
   0x 01 00 00 00 00 00 00 00  


what does 'go.info,go.range' mean in this asm? how can I found info about 
this? I had see the doc, but not I wanted. https://golang.org/doc/asm

-- 
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.


[go-nuts] Re: why can't change map when in for range statements?

2018-01-15 Thread sheepbao
Thanks reply, I know *range expression is evaluated once before beginning 
the loop, *but I delete map in for statements also really affected the 
loop. why not set to nil can't affect real map.

func mapTest() {

m := map[int]int{1: 1, 2: 2}

for k, v := range m {

println(k, v)

delete(m, 2)

// m = nil

}

}
// output:
// 1 1




On Tuesday, January 16, 2018 at 10:48:45 AM UTC+8, Kevin Powick wrote:
>
>
>
> On Monday, 15 January 2018 21:23:40 UTC-5, sheepbao wrote:
>>
>> I wrote this code, and why `map=nil` don't stop the loop?
>> ```go
>>
>> func mapTest() {
>>
>> m := map[int]int{1: 1, 2: 2}
>>
>> for k, v := range m {
>>
>> println(k, v)
>>
>> m = nil
>>
>> }
>>
>> }
>>
>> ```
>>
>> output:
>>
>> 1 1
>>
>> 2 2
>>
>>
>> I don't understand when I set  `m = nil`, the loop is not stop. m doesn't 
>> seem to be affected.
>>
>
> https://golang.org/ref/spec#For_statements
>
>
> *The range expression is evaluated once before beginning the loop, with 
> one exception: if the range expression is an array or a pointer to an array 
> and at most one iteration variable is present, only the range expression's 
> length is evaluated; if that length is constant, by definition the range 
> expression itself will not be evaluated. *
>
>
>
> --
> Kevin Powick
>
>
>

-- 
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.


[go-nuts] why can't change map when in for range statements?

2018-01-15 Thread sheepbao
I wrote this code, and why `map=nil` don't stop the loop?
```go

func mapTest() {

m := map[int]int{1: 1, 2: 2}

for k, v := range m {

println(k, v)

m = nil

}

}

```

output:

1 1

2 2


I don't understand when I set  `m = nil`, the loop is not stop. m doesn't 
seem to be affected.


-- 
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.


[go-nuts] Re: A way to detect closed channel

2017-11-06 Thread sheepbao
func isClose() bool {
select {
case <-closeChan:
return true
default:
return false
}
}




在 2017年11月7日星期二 UTC+8上午8:59:51,Albert Tedja写道:
>
> So, I just found out that closed channels always yield the zero value. 
> That means, a closed channel inside a select statement seems to always be 
> guaranteed to be executed.
>
> Since closing an already closed channel creates a panic, does this mean 
> then I can do this to make sure that the channel is closed only once?
>
>
> select {
> case <- closedchan:
> default:
> close(closedchan)
> }
>
>
>
> Golang playground: https://play.golang.org/p/LSrTh0HC2K
>
> It seems to work. Just want to confirm here before start doing this 
> everywhere in my code.
>

-- 
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.


Re: [go-nuts] is this code thread safety?

2017-11-03 Thread sheepbao
Thanks, I got it.

On Friday, November 3, 2017 at 11:26:31 AM UTC+8, Jesse McNelis wrote:
>
> On Thu, Nov 2, 2017 at 4:54 PM, sheepbao <listo...@gmail.com > 
> wrote: 
> > 
> > the close function is thread safety? how about call `closed` at the same 
> > time. 
>
> It's not safe. Multiple goroutines can enter the 'default'  case in 
> that select and close() the channel multiple times. 
>
> "Sending to or closing a closed channel causes a run-time panic." 
> https://golang.org/ref/spec#Close 
>

-- 
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.


[go-nuts] is this code thread safety?

2017-11-01 Thread sheepbao

package main

import "time"
import "fmt"
import "sync/atomic"

func main() {
   die := make(chan struct{})
   i := int32(0)
   closed := func() {
   select {
   case <-die:
   atomic.AddInt32(, 1)
   default:
   close(die)
   fmt.Println("closed")
   }
   }
   N := 10
   for i := 0; i < N; i++ {
   go closed()
   }
   time.Sleep(10 * time.Second)
   fmt.Println(atomic.LoadInt32())
}


the close function is thread safety? how about call `closed` at the same 
time.

-- 
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.


[go-nuts] param represents a bit in struct?

2017-10-15 Thread sheepbao
is golang has any like this represents a bit in struct in c language :


struct tcphdr {
uint16_t sport;
uint16_t dport;
uint32_t seq;
uint32_t ack_seq;
uint8_t rsvd : 4;
uint8_t hl : 4;
uint8_t fin : 1,
syn : 1,
rst : 1,
psh : 1,
ack : 1,
urg : 1,
ece : 1,
cwr : 1;
uint16_t win;
uint16_t csum;
uint16_t urp;
uint8_t data[];
} __attribute__((packed));

-- 
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.


[go-nuts] Re: memclr optimazation does worse?

2016-12-14 Thread sheepbao
I have the same result in the Mac, go 1.7.1
```go

BenchmarkMemclr_100-4   1 22.8 ns/op

BenchmarkLoop_100-4 3000 47.1 ns/op

BenchmarkMemclr_1000-4  1000   181 ns/op

BenchmarkLoop_1000-4 500   365 ns/op

BenchmarkMemclr_1-4   50   2777 ns/op

BenchmarkLoop_1-4 30   4003 ns/op

BenchmarkMemclr_10-4   5 38993 ns/op

BenchmarkLoop_10-4 3 43893 ns/op

BenchmarkMemclr_20-4   2 79159 ns/op

BenchmarkLoop_20-4 2 87533 ns/op

BenchmarkMemclr_30-4   1 127745 ns/op

BenchmarkLoop_30-4 1 140770 ns/op

BenchmarkMemclr_40-4   1 217689 ns/op

BenchmarkLoop_40-4 1 234632 ns/op

BenchmarkMemclr_50-45000 344265 ns/op

BenchmarkLoop_50-4  2000 535585 ns/op

BenchmarkMemclr_100-4   1000   1130508 ns/op

BenchmarkLoop_100-4 2000 889592 ns/op

BenchmarkMemclr_200-4   1000   2071970 ns/op

BenchmarkLoop_200-4 1000   1758001 ns/op

PASS

ok  _/Users/bao/program/go/learn/goTour/memclr 37.313s

```

-- 
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.