[go-nuts] Re: How to disable fmt-Error messages

2018-08-10 Thread 'Björn Karge' via golang-nuts
This is a Q&D workaround. A maintenance nightmare, but it works. Sprintf("Hello"+"%[2]s", "World", "") On Monday, January 31, 2011 at 7:46:59 PM UTC+8, Ondekoza wrote: > > The fmt-package has a convinent error report method. > > According to > > http://golang.org/pkg/fmt/ > > a string print

[go-nuts] Re: memmove receives NULL src and positive length?

2017-08-16 Thread 'Björn Karge' via golang-nuts
Just a minor correction: go tool objdump showed that *golang does not touch the pointer value before overwriting it*. The situation does occur nevertheless because obj.data may be nil [0x0,0,0] initially, and length/capacity are assigned before the data pointer is set: obj.data : [0x0,0,0] GR1>

[go-nuts] Re: memmove receives NULL src and positive length?

2017-08-15 Thread 'Björn Karge' via golang-nuts
Jakob, thanks for your suggestion - it lifted me out of the too narrow context :-) The reason seems to be that src is already corrupt when arriving at f() because of a data race (between go routines GR1, GR2 below), copying a slice during (non-atomic) assignment. The null pointer is probably pl