Re: [go-nuts] Memory leak when calling highly parallel goroutines

2017-10-26 Thread Nathan Kerr
Read Ways to limit concurrent resource use for different methods that can be used to limit concurrency along with example code. On Wednesday, October 25, 2017 at 9:05:44 PM UTC+2, Tamás Gulácsi wrote: > > Just blind shots: > resp.Body.Close(), >

[go-nuts] go/types#Check is not resolving external package source positions.

2017-10-26 Thread kpratt
I have a simple example file: == package gobbledy_gook import ( "log" turtle "github.com/rs/zerolog/log" "os" "github.com/rs/zerolog" ) var LOG = turtle.Logger.Output(os.Stdout).Error() func g() []zerolog.Logger { return []zerolog.Logger{} } func

Re: [go-nuts] Mapping function name/address to rtype/functype

2017-10-26 Thread Ian Lance Taylor
On Thu, Oct 26, 2017 at 4:08 PM, wrote: > > Maybe I have some false assumptions here, but if I had a dynamically-linked > go library that I stripped, how would I be able to use reflection at runtime > when using things from this library. Yes, you are onto something there, something I didn't ment

Re: [go-nuts] Mapping function name/address to rtype/functype

2017-10-26 Thread max . shavrick
Maybe I have some false assumptions here, but if I had a dynamically-linked go library that I stripped, how would I be able to use reflection at runtime when using things from this library. (Does go support making dynamic libraries?) Thank you Max On Thursday, October 26, 2017 at 5:52:49 PM UT

Re: [go-nuts] Mapping function name/address to rtype/functype

2017-10-26 Thread Ian Lance Taylor
On Thu, Oct 26, 2017 at 1:34 PM, wrote: > (Hoping this is the right place to ask this...) Yes, this is at any rate one of the right places. > I'm wondering if there's a way to map the function name/address to the > function's rtype/functype on a stripped go binary (at least, for ELF)? I > know

[go-nuts] Mapping function name/address to rtype/functype

2017-10-26 Thread max . shavrick
(Hoping this is the right place to ask this...) I'm wondering if there's a way to map the function name/address to the function's rtype/functype on a stripped go binary (at least, for ELF)? I know the funcType is in .rodata, but I don't see any mapping from .gopclntab -> .typelink, or .gopclnta

Re: [go-nuts] a bug about go language

2017-10-26 Thread Kevin Powick
On Thursday, 26 October 2017 09:18:07 UTC-4, 28911...@gmail.com wrote: > > I try to do tis:go run chapter11.2.go 127.0.0.1 and the program runs > sucessfully.Thank you so much.But I don't know why. Other program don't > nedd to add 127.0.0,1,.What's the principle of it? > The program you are ru

[go-nuts] Re: Binary Download

2017-10-26 Thread Nigel Vickers
Update, gvt1.com is apparantly used for automatic updating by Google for components such as Chrome and SDKs etc. It is currently blocked by our "Hardening Team". It also uses multiple http redirects with "chained credentials"(whatever that means!) which our team won't accept. Changing the downl

[go-nuts] Re: [golang-dev] Subject: Go 1.9.2 and Go 1.8.5 are released

2017-10-26 Thread 'Chris Broadfoot' via golang-nuts
Nice! Thank you for maintaining these! BTW, if it helps, all tarballs are now gpg signed. (add .asc to the download URL) On Oct 25, 2017 7:58 PM, "Michael Hudson-Doyle" < michael.hud...@canonical.com> wrote: > I've updated my snaps with both these releases, so users with the snap > already insta

Re: [go-nuts] a bug about go language

2017-10-26 Thread 2891132love
在 2017年10月25日星期三 UTC+8上午2:35:52,Justin Israel写道: > > > > On Wed, Oct 25, 2017, 2:56 AM Ian Lance Taylor > wrote: > >> On Tue, Oct 24, 2017 at 5:18 AM, <28911...@gmail.com > >> wrote: >> > >> > So how to modify it? I don't know clearly.Would you mind helping ,me to >> > solve this problem? >> >

Re: [go-nuts] a bug about go language

2017-10-26 Thread 2891132love
I try to do this: go run chapter11.2.go 127.0.0.1 and the program runs successfullly.Thank you so much.But I don't know why.Other prgrams don't need to add 127.0.0.1,what"s the principle? 在 2017年10月24日星期二 UTC+8下午9:57:03,Ian Lance Taylor写道: > > On Tue, Oct 24, 2017 at 5:18 AM, <28911...@gmail.com

Re: [go-nuts] a bug about go language

2017-10-26 Thread 2891132love
I try to do tis:go run chapter11.2.go 127.0.0.1 and the program runs sucessfully.Thank you so much.But I don't know why. Other program don't nedd to add 127.0.0,1,.What's the principle of it? -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To u

[go-nuts] A question about the description of sync.Pool.Get

2017-10-26 Thread Tamás Gulácsi
It emphasize "Callers should not assume any relation between values passed to Put and the values returned by Get." It is to allow the implementation to do as it wish - it is not a free list, but a GC-friendly hack that helps amortize allocation cost for unknown number of goroutines. -- You re

Re: [go-nuts] Re: Binary Download

2017-10-26 Thread Steven Hartland
We also had Auth issues: => Attempting to fetch http://golang.org/dl/go1.9.2.src.tar.gz SSL certificate subject doesn't match host r16---sn-aigllnds.gvt1.com fetch: http://golang.org/dl/go1.9.2.src.tar.gz: Authentication error On 26/10/2017 10:54, paul.totter...@gmail.com wrote: Tried to up

Re: [go-nuts] Re: get the data out of slice of structs

2017-10-26 Thread Jan Mercl
On Thu, Oct 26, 2017 at 12:25 PM Vikram Rawat wrote: > ... my problem is that there are no slice of time.Time. var foo []time.Time // is a slice of time.Time In general, []T is a slice of T. T can by any named type, local or imported or it can be a type literal, like in []struct{i int}, which i

Re: [go-nuts] Re: get the data out of slice of structs

2017-10-26 Thread Vikram Rawat
> > Thank you very much for the reply but my problem is that there are no > slice of time.Time. This is the main reason I chose to get the data this > way by creating a slice of struct. > Can you tell me what is the best way to get this sort of data in a struct of 2 slices. my code is packag

[go-nuts] Re: Binary Download

2017-10-26 Thread paul . totterman
> > Tried to update to 1.9.2 and 1.8.5 with godeb. Oops "no downloads found" > Downloads only through a redirector. > https://redirector.gvt1.com/edgedl/go/go1.9.2.linux-386.tar.gz whois > GVT1.COM returns Registrar URL: http://www.markmonitor.com. Can sombody > point me to the discussion ab

[go-nuts] Binary Download

2017-10-26 Thread Nigel Vickers
Tried to update to 1.9.2 and 1.8.5 with godeb. Oops "no downloads found" Downloads only through a redirector. https://redirector.gvt1.com/edgedl/go/go1.9.2.linux-386.tar.gz whois GVT1.COM returns Registrar URL: http://www.markmonitor.com. Can sombody point me to the discussion about this chan

Re: [go-nuts] Re: get the data out of slice of structs

2017-10-26 Thread Jan Mercl
On Thu, Oct 26, 2017 at 11:39 AM Vikram Rawat wrote: > How do a get a slice of DState from got this is my question var a []string for _, v := range got[1:3] { a = append(a, v.DState) } -- -j -- You received this message because you are subscribed to the Google Groups "golang-nuts"

[go-nuts] Re: get the data out of slice of structs

2017-10-26 Thread Vikram Rawat
I was able to get the Data from SQL into got but when I print fmt.Println(got[1:3]) fmt.Println(got[2:3]) fmt.Println(got[1:3]) fmt.Println(got[3:3]) it produces the following result [{2017-09-07 15:25:45.346887 + + HR} {2017-09-07 15:39:44.24207 + + DL}] [{2017-09-07 15:39:

[go-nuts] A question about the description of sync.Pool.Get

2017-10-26 Thread jingguo yao
Can anyone explain the meaning of " Get may choose to ignore the pool and treat it as empty." in https://golang.org/pkg/sync/#Pool.Get? > Get selects an arbitrary item from the Pool, removes it from the Pool, and returns it to the caller. Get may choose to ignore the pool and treat it as empty. Ca

[go-nuts] Re: [golang-dev] Subject: Go 1.9.2 and Go 1.8.5 are released

2017-10-26 Thread Jan Mercl
On Thu, Oct 26, 2017 at 1:51 AM Chris Broadfoot wrote: > We have just released Go versions 1.9.2 and 1.8.5, minor point releases. FYI: All Go1.9.2 milestone issues are open ATM. -- -j -- You received this message because you are subscribed t

[go-nuts] Re: get the data out of slice of structs

2017-10-26 Thread jra
At this point, variable got is a slice of length 0. If you tried to access got[0], you'd get a panic at runtime for out of bounds access. You could add a State to it like this: got = append(got, State{ DLastmodified: time.Now(), DState: "test" }) and then access it with got[0]. You would probab

[go-nuts] Re: [golang-dev] Subject: Go 1.9.2 and Go 1.8.5 are released

2017-10-26 Thread jra
On Thursday, October 26, 2017 at 4:58:52 AM UTC+2, Michael Hudson-Doyle wrote: > > I've updated my snaps with both these releases, so users with the snap > already installed should get them soon, or snap install --classic --channel > 1.9/stable go on an ubuntu or ubuntu-like system if you want t

[go-nuts] Re: get the data out of slice of structs

2017-10-26 Thread Volker Dobler
On Thursday, 26 October 2017 08:30:29 UTC+2, Vikram Rawat wrote: > > I have created a struct > > type State struct{ > DLastmodified time.Time > DState string > } > > > > and created a slice of struct like > > > got :=[]State{} > > > Now I am unable to get the column data out of this slice. please

[go-nuts] Re: Go misfeature?

2017-10-26 Thread Harald Fuchs
Ian Lance Taylor writes: >> For us, it *did* break P1 in the sense that this silently changing its >> semantics. And how about the following? >> >> type P1 struct { >> P2 >> P3 >> } >> >> type P2 struct { >> P4 >> } >> >> type P3 struct { >> P5 >> } >> >> type P4 st