[go-nuts] what is the scene to use mapaccess1_fat and mapaccess2_fat?

2020-12-15 Thread xie cui
https://github.com/golang/go/blob/master/src/runtime/map.go#L554 https://github.com/golang/go/blob/master/src/runtime/map.go#L562 -- 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, se

[go-nuts] equal func in type?

2020-12-15 Thread xie cui
https://github.com/golang/go/blob/master/src/reflect/type.go#L315 is this equal func generate by compiler, so where can i find the code generate this func? what is the rule for compare two object of same struct? -- You received this message because you are subscribed to the Google Groups "gola

Re: [go-nuts] What are debian:buster-slim advantages vs alpine ones?

2020-12-15 Thread Amit Saha
On Wed, 16 Dec 2020, 12:38 pm Constantine Vassilev, wrote: > All examples in Google Cloud Run for building > Golang Docker images are based on Debian. > > FROM golang:alpine AS builder > ... > FROM debian:buster-slim > ... > > What are debian:buster-slim advantages vs alpine ones? > Besides the

[go-nuts] What are debian:buster-slim advantages vs alpine ones?

2020-12-15 Thread Constantine Vassilev
All examples in Google Cloud Run for building Golang Docker images are based on Debian. FROM golang:alpine AS builder ... FROM debian:buster-slim ... What are debian:buster-slim advantages vs alpine ones? -- You received this message because you are subscribed to the Google Groups "golang-nut

[go-nuts] Re: Interfaces holding integers and memory allocations

2020-12-15 Thread 'Keith Randall' via golang-nuts
Unfortunately for you, interfaces are immutable. We can't provide a means to create an interface from a pointer, because then the user can modify the interface using the pointer they constructed it with (as you were planning to do). You could use a modifiable reflect.Value for this. var i int6

Re: [go-nuts] Purpose of pattern in muxEntry

2020-12-15 Thread Amit Saha
> On 16 Dec 2020, at 5:49 am, jake...@gmail.com wrote: > > I have no special knowledge of the code, but it looks like the reason is so > that ServeMux.es , which is a []muxEntry, can be > searched. See the latter half of `func (mux *ServeMux) match() >

[go-nuts] Re: Interfaces holding integers and memory allocations

2020-12-15 Thread ben...@gmail.com
Nice project! It's a pity Go doesn't have C-like unions for cases like this (though I understand why). In my implementation of AWK in Go, I modelled the value type as a pseudo-union struct, passed by value: type value struct { typ valueType // Type of value (Null, Str, Num, NumStr) s

[go-nuts] get decibel level from audio stream or file

2020-12-15 Thread Jeff Mangan
I want to know if there is a, internal or other package to get the decibel level from an audio stream or file say every second, or few seconds, etc... I tried searching and have not found anything. Anyone know of a way to accomplish this with golang? I'd rather not use c#, java, etc... Than

[go-nuts] Re: Purpose of pattern in muxEntry

2020-12-15 Thread jake...@gmail.com
I have no special knowledge of the code, but it looks like the reason is so that ServeMux.es, which is a []muxEntry, can be searched. See the latter half of `func (mux *ServeMux) match() ` for example. That said, it may be possible t

[go-nuts] Interfaces holding integers and memory allocations

2020-12-15 Thread Arnaud Delobelle
Hi The context for this question is that I am working on a pure Go implementation of Lua [1] (as a personal project). Now that it is more or less functionally complete, I am using pprof to see what the main CPU bottlenecks are, and it turns out that they are around memory management. The fir