[go-nuts] interface array and ... operator

2018-10-23 Thread Mayank Jha
why does A() not work while B works here, https://play.golang.org/p/59bpr8TCIge -- 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

Re: [go-nuts] Hanging net/http.(*persistConn).writeLoop/readLoop's

2018-10-23 Thread ecarter202
Almost 3 years later... I seem to be having the same issue you were having. I have a worker pool, and each concurrent worker has its own client / transport. I do this because each transport/dialer has different proxy settings, and there seemed to be no other way to circumvent this, such as

Re: [go-nuts] Hanging net/http.(*persistConn).writeLoop/readLoop's

2018-10-23 Thread ecarter202
So far it looks like adding a timeout to the clients "works". Is this what you ended up having to do? On Monday, December 14, 2015 at 11:56:32 AM UTC-7, Sander van Harmelen wrote: > > > While the http.Client itself isn't as big an issue, you will want to > > pair each transport with its own

[go-nuts] liteide x35 released! Go1.11 modules support.

2018-10-23 Thread visualfc
Hi, all. LiteIDE X35 released! This version fast lookup types info and jump source by cache. Fix Delve plugin debug blocking bug.  All support Go1.11 modules ( gocode / jump / find usages / find usages on module work ) * LiteIDE Home   * LiteIDE Source code  

Re: [go-nuts] Calendar Integration Values

2018-10-23 Thread Caleb Mingle
John, Here's what I found. I believe this private URL includes what Google refers to as a "magic cookie" for authentication. An old post (from 2008) asks if this can be retrieved via an API, with a response from Google:

Re: [go-nuts] Calendar Integration Values

2018-10-23 Thread Caleb Mingle
John, Apologies, I misunderstood your initial question. I wouldn’t be surprised if those values were not exposed via an API, but I’ll do some research and report back. - mingle On Tue, Oct 23, 2018 at 13:59 John More wrote: > Mingle, > The library I am using is the

Re: [go-nuts] Re: do you use binary-only packages?

2018-10-23 Thread Robert Engels
Thanks. I have a better understanding of the situation after reading the reference. Sent from my iPhone > On Oct 23, 2018, at 4:53 PM, Ian Lance Taylor wrote: > >> On Tue, Oct 23, 2018 at 2:11 PM, Robert Engels wrote: >> >> So are there any plans for security patches for prior versions

Re: [go-nuts] Re: do you use binary-only packages?

2018-10-23 Thread Ian Lance Taylor
On Tue, Oct 23, 2018 at 2:11 PM, Robert Engels wrote: > > So are there any plans for security patches for prior versions shipped as an > updated shared library? > > Given the amount of code in the std it seems this would be almost a > requirement - if Go apps are released in the wild in binary

Re: [go-nuts] Re: invalid months and years in time package

2018-10-23 Thread andrey mirtchovski
as https://golang.org/pkg/time/#Date says: The month, day, hour, min, sec, and nsec values may be outside their usual ranges and will be normalized during the conversion. For example, October 32 converts to November 1. On Tue, Oct 23, 2018 at 3:12 PM wrote: > > If you check the source code for

[go-nuts] Re: invalid months and years in time package

2018-10-23 Thread alan . fox6
If you check the source code for the time.Date() function, you'll find that it does indeed normalize the date by calling a private 'norm' function. So, if you enter a month of 13, it will overflow into January of the following year. My guess is that they thought this was a better solution than

Re: [go-nuts] Re: do you use binary-only packages?

2018-10-23 Thread Robert Engels
So are there any plans for security patches for prior versions shipped as an updated shared library? Given the amount of code in the std it seems this would be almost a requirement - if Go apps are released in the wild in binary form (e.g Linux tools) Sent from my iPhone > On Oct 23, 2018, at

Re: [go-nuts] Calendar Integration Values

2018-10-23 Thread John More
Mingle, The library I am using is the "google.golang.org/api/calendar/v3" which accesses the https://www.googleapis.com/calendar/v3 REST interface. I would like to read the secret address of a calendar that I create in a G Suite domain user's account so I can dynamically forward it to another

[go-nuts] Re: invalid months and years in time package

2018-10-23 Thread taras . di
Yes sorry -1 is a valid year. An invalid month is any integer outside of [1,12]. We can always define month 13 as January if we adopt Z_12, but I expected an error to occur. Accepting months outside of [1,12] violates the Principle of least astonishment. For comparison, python verifies the

Re: [go-nuts] microservices framework

2018-10-23 Thread Vasiliy Tolstov
вт, 23 окт. 2018 г. в 20:23, Marko Ristin-Kaufmann : > > Hi Vasiliy, > We use our own swagger-to code generator for external communication and > zeromq & protobufs for internal components. > > We foung the code generated by go-swagger to be a bit too complex. > > Swagger-to:

Re: [go-nuts] microservices framework

2018-10-23 Thread Marko Ristin-Kaufmann
Hi Vasiliy, We use our own swagger-to code generator for external communication and zeromq & protobufs for internal components. We foung the code generated by go-swagger to be a bit too complex. Swagger-to: https://github.com/Parquery/swagger-to Cheers Marko Le mar. 23 oct. 2018 à 19:02,

[go-nuts] microservices framework

2018-10-23 Thread Vasiliy Tolstov
Hi! I'm looking for new project some framework to write microservice based app. I'm found micro and go-kit. But micro have needed features only in enterprise version (i'm need mit / bsd license) , go-kit for simple service need to big code (now i'm using grpc-gateway and grpc based services) and

Re: [go-nuts] Regarding contracts

2018-10-23 Thread Burak Serdar
On Mon, Oct 22, 2018 at 2:10 PM Burak Serdar wrote: > > On Mon, Oct 22, 2018 at 1:53 PM Marvin Renich wrote: > > > > * Burak Serdar [181018 15:08]: > > > tbh, I am not trying to avoid operator overloading, I am trying to > > > avoid the contracts. With operator overloading, you can write: > > >

Re: [go-nuts] Re: do you use binary-only packages?

2018-10-23 Thread Ian Lance Taylor
On Mon, Oct 22, 2018 at 8:53 PM, Robert Engels wrote: > > Wait... you can ship a Go binary that dynamically links with the Go runtime > and stdlib at runtime??? Awesome. Can you point me to the docs on this. I’ve > always considered the “single binary” taunted feature as somewhat of a >

[go-nuts] Re: invalid months and years in time package

2018-10-23 Thread Volker Dobler
Why is year -1 invalid and what is an "invalid" month given that 13==1 in Z_12? V. On Tuesday, 23 October 2018 16:01:00 UTC+2, Taras D wrote: > > Hi, > > I was surprised to find the following worked without any reported errors: > > t1 := time.Date(-1, 1, 10, 23, 0, 0, 0, time.UTC) // invalid

Re: [go-nuts] invalid months and years in time package

2018-10-23 Thread Matthew Singletary
I believe that the normalization going on is assuming that the date is valid, but the pieces representing that date might individually be invalid. Date validation is usually for building a valid date, but if you know the date is valid (even if the parts aren't), then you can skip validating the

[go-nuts] invalid months and years in time package

2018-10-23 Thread taras . di
Hi, I was surprised to find the following worked without any reported errors: t1 := time.Date(-1, 1, 10, 23, 0, 0, 0, time.UTC) // invalid year t2 := time.Date(2000, 13, 10, 23, 0, 0, 0, time.UTC) // invalid month m := time.Month(13) // invalid month What is the rationale in accepting invalid

Re: [go-nuts] Re: do you use binary-only packages?

2018-10-23 Thread Robert Engels
Is there documentation on how to do this, or was I misunderstanding your answer? Thanks. > On Oct 22, 2018, at 10:53 PM, Robert Engels wrote: > > Wait... you can ship a Go binary that dynamically links with the Go runtime > and stdlib at runtime??? Awesome. Can you point me to the docs on

Re: [go-nuts] New development tool: missing watch mode for "go"

2018-10-23 Thread Nelo Mitranim
@Henrik Comparing with general purpose watchers, being Go-specific makes it easier to remember and lets it work well for Go projects with no configuration. Mnemonically, it's invoked exactly like "go". It ignores non-Go files by default. I can imagine the "go" tool eventually getting a "-w"

Re: [go-nuts] New development tool: missing watch mode for "go"

2018-10-23 Thread Henrik Johansson
I have always used https://github.com/cespare/reflex what is the main benefit vs this and the other quite numerous options? tis 23 okt. 2018 kl 11:28 skrev Nelo Mitranim : > Good day gophers! > > I want to highlight a certain Go development tool. My golleagues (sic) and > I have found it quite

Re: [go-nuts] Sharing data via Mutex vs. Channel

2018-10-23 Thread Henrik Johansson
Mutexes aren't expensive when compared to channels. They are usually harder to get right and that's why there is the old Go mantra: "Don't communicate by sharing memory; instead, share memory by communicating." I would say you should use what fits the use case but prefer channels if possible.

[go-nuts] Sharing data via Mutex vs. Channel

2018-10-23 Thread 'Reinhard Luediger' via golang-nuts
Hi folks, somwhere on my golang journey ("don't k now where and when") I was teached that mutexes are very expensive and we should prefer to communicate over channels instead of working with mutexes. I trusted it until today. I explained it to our aprentice based on my knowledge and he asked

[go-nuts] New development tool: missing watch mode for "go"

2018-10-23 Thread Nelo Mitranim
Good day gophers! I want to highlight a certain Go development tool. My golleagues (sic) and I have found it quite enjoyable to use: https://github.com/Mitranim/gow "gow" is the missing watch mode for the "go" command. It's invoked exactly like "go", but watches files and reruns the subcommand

Re: [go-nuts] How would Go 2 code using generics actually look like?

2018-10-23 Thread Sebastien Binet
Gary, On Tue, Oct 23, 2018 at 10:49 AM wrote: > In that example, how would you call the `New` function? > like this: - https://github.com/sbinet/go2-test/blob/master/ndarray/nd_test.go func TestArray1D(t *testing.T) { shape := []int{10} arr0 := ndarray.New(float64)(shape, []float64{0, 1, 2,

Re: [go-nuts] How would Go 2 code using generics actually look like?

2018-10-23 Thread gary . willoughby
In that example, how would you call the `New` function? On Monday, 22 October 2018 10:10:51 UTC+1, Sebastien Binet wrote: > > Hi Volker, > > On Mon, Oct 22, 2018 at 10:57 AM Volker Dobler > wrote: > >> The Go 2 draft generics draft has been discussed a lot, >> especially contracts have drawn a