Re: [go-nuts] Re: What is the reason behind time.Parse using a reference time?

2019-08-15 Thread Wojciech S. Czarnecki
On Wed, 14 Aug 2019 19:12:40 -0700 (PDT) sp55aa@gmail.com wrote: > What is the reason behind time.Parse using a reference time? The rationale is that every position of the reference time can be treated as an enum (of int) stating the exact meaning of the field: 01/02 03:04:05PM '06 -0700 1 2

Re: [go-nuts] panic: interface conversion: interface is nil, not encoding.BinaryUnmarshaler

2019-08-15 Thread 'Axel Wagner' via golang-nuts
On Thu, Aug 15, 2019 at 11:14 AM Jochen Voss wrote: > You are right. But the type is somehow represented by some index or so, > instead of the name? Since the type needs to be registered using > gob.Register() beforehand, this seems not totally impossible to me. > `Register` only gets the

[go-nuts] Re: Open Source audit of go package dependencies for security vulnerabilities?

2019-08-15 Thread Chris Hines
Have you seen: https://github.com/sonatype-nexus-community/nancy "A tool to check for vulnerabilities in your Golang dependencies, powered by Sonatype OSS Index" On Wednesday, August 14, 2019 at 1:02:03 AM UTC-4, Eric Johnson wrote: > > And then, it also occurs to me that perhaps I can answer

Re: [go-nuts] panic: interface conversion: interface is nil, not encoding.BinaryUnmarshaler

2019-08-15 Thread 'Axel Wagner' via golang-nuts
I haven't really used gob much, so unfortunately I can't *really* help you. But one thing to note is that you can dump the content of the buffer and see that it doesn't actually contain the name of the type you are encoding: https://play.golang.org/p/R8HB6RP8kS0 I agree that from the

Re: [go-nuts] panic: interface conversion: interface is nil, not encoding.BinaryUnmarshaler

2019-08-15 Thread 'Axel Wagner' via golang-nuts
Hm, I looked a bit at the code. ISTM that if you implement BinaryMarshaler/Unmarshaler (or GobEncoder/Decoder), the values are sent as a []byte, not an interface, so the concrete type information is lost. You can kind of circumvent this, by instead passing the values as interface{}:

Re: [go-nuts] panic: interface conversion: interface is nil, not encoding.BinaryUnmarshaler

2019-08-15 Thread Jochen Voss
Dear Marcin, My aim is to unmarshal into an interface variable, without having to know in advance which concrete type I'm receiving (the actual interface has several possible implementations, and gob data comes in over a network connection). So, while your code avoids the panic, it does not

Re: [go-nuts] panic: interface conversion: interface is nil, not encoding.BinaryUnmarshaler

2019-08-15 Thread Jochen Voss
Hi Axel, On Thursday, 15 August 2019 09:13:17 UTC+1, Axel Wagner wrote: > > I haven't really used gob much, so unfortunately I can't *really* help > you. But one thing to note is that you can dump the content of the buffer > and see that it doesn't actually contain the name of the type you are

Re: [go-nuts] panic: interface conversion: interface is nil, not encoding.BinaryUnmarshaler

2019-08-15 Thread Robert Engels
I think you will need to encode a struct that contains the type name and the struct. Then you decode using reflection.-Original Message- From: 'Axel Wagner' via golang-nuts Sent: Aug 15, 2019 3:12 AM To: Jochen Voss Cc: golang-nuts Subject: Re: [go-nuts] panic: interface conversion:

Re: [go-nuts] panic: interface conversion: interface is nil, not encoding.BinaryUnmarshaler

2019-08-15 Thread 'Axel Wagner' via golang-nuts
Please see upthread - gob does that for you. On Thu, Aug 15, 2019 at 5:59 PM Robert Engels wrote: > I think you will need to encode a struct that contains the type name and > the struct. Then you decode using reflection. > > -Original Message- > From: 'Axel Wagner' via golang-nuts >

[go-nuts] Tips for reproducing flaky Go tests

2019-08-15 Thread mark
I put together a blog post on reproducing flaky Go tests: https://www.influxdata.com/blog/reproducing-a-flaky-test-in-go/ This was the result of what I've learned spending many, many hours hunting down many unreliable tests. I hope these tips can help you out next time you have a test that

[go-nuts] Golang project ideas

2019-08-15 Thread kifenraph
I'm new to go, been working with go for about ten weeks. So far, I've worked on a couple of blockchain related projects (decred), and made some PRs. But I still feel like I need more to be well grounded in golang. So does anyone have any golang real world project ideas? I cannot seem to come

[go-nuts] Re: Distributing task execution

2019-08-15 Thread mfateev
Look at the Cadence Workflow. It is a very powerful orchestration solution including periodic jobs. And it has Go SDK: https://cadenceworkflow.io/ On Friday, August 9, 2019 at 5:39:44 AM UTC-7, Thiru k wrote: > > Hi, > We have used goLang for developing the web based application using micro >

[go-nuts] Go 1.12.9 is released

2019-08-15 Thread Dmitri Shuralyov
Hello gophers, We have just released Go version 1.12.9, a minor point release. This release includes fixes to the linker, and the os and math/big packages. View the release notes for more information: https://golang.org/doc/devel/release.html#go1.12.minor You can download binary and source

[go-nuts] golang with XSLT

2019-08-15 Thread p Chak
Hi, I am newbie to golang programming and planning to use xslt. Please let me know the best XSLT API for golang. Thanks Praveen -- 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,

Re: [go-nuts] Re: What is the reason behind time.Parse using a reference time?

2019-08-15 Thread Michael Baldry
I agree with that. It is an odd choice, as I've never seen any other library use a reference date like that - there may be many but in 20 years, I've not seen one. I think your argument about Parse is valid, but in most cases, you'll be passing in a variable for the date you are parsing and the

[go-nuts] add guru support refer folder outside gopath

2019-08-15 Thread hui zhang
"Find All References" does not find code in other packages outside GOPATHin vscode https://github.com/microsoft/vscode-go/issues/2236 https://github.com/Microsoft/vscode-go/issues/1602 https://github.com/Microsoft/vscode-go/issues/1473 the root cause is that guru did not support that. as