[go-nuts] Re: go mod dependency hell is real

2019-09-14 Thread Manlio Perillo
On Tuesday, September 10, 2019 at 2:48:25 PM UTC+2, Darko Luketic wrote: > > What used to work pre go 1.13 now doesn't work anymore > > go mod is one big mess no one needs and complicates everything > I'm now getting ambiguity. How do I resolve it? > Nothing compiles anymore > > ✘ darko@wrk 

[go-nuts] Use of NoMethod type for custom marshaling

2019-09-14 Thread Sathish VJ
I saw some code where there is a temporary type called *noMethod* created before performing custom marshaling. What is the purpose of doing this? type T struct { A int C string } func (t T) MarshalText() (text []byte, err error) { type noMethod T return json.Marshal(noMethod(t)) }

Re: [go-nuts] regarding regex package

2019-09-14 Thread Ian Lance Taylor
On Sat, Sep 14, 2019 at 12:40 AM Durga Someswararao G wrote: > > I tried to execute one regular expression with regex package. When I try to > compile I am getting unsupported Perl syntax. After reading regex syntax > conclusion is golang not supporting some combination regex patterns like >

Re: [go-nuts] Re: If v2.x.y+incompatible exists, then getting the modules based v3 version will always fail?

2019-09-14 Thread T L
On Friday, September 13, 2019 at 3:19:55 PM UTC-4, andrey mirtchovski wrote: > > are you following the steps outlined below? > > https://github.com/golang/go/wiki/Modules#releasing-modules-v2-or-higher > > in particular, for a v2 (or v3) it states that the go.mod file must be > updated: > >

[go-nuts] regarding regex package

2019-09-14 Thread Durga Someswararao G
Hi, I tried to execute one regular expression with regex package. When I try to compile I am getting unsupported Perl syntax. After reading regex syntax conclusion is golang not supporting some combination regex patterns like positive lookahed,negative lookahed etc. Is there any alternative or

Re: [go-nuts] Use of NoMethod type for custom marshaling

2019-09-14 Thread Ben Burwell
On Sat Sep 14, 2019 at 1:43 AM Sathish VJ wrote: > I saw some code where there is a temporary type called *noMethod* created > before performing custom marshaling. > > What is the purpose of doing this? > > type T struct { > A int > C string > } > > func (t T) MarshalJSON() (text []byte, err

Re: [go-nuts] Re: go mod dependency hell is real

2019-09-14 Thread Antoine Mercadal
Hey, Then why is it called mvs? I don't understand what package system would give me 1.3.49, if I require 1.2.0 and my dependency requires 1.1.0. I'll read a bit more about it, but you may have decreased my level of go module hate by a bit, sir :) Thanks, -- Antoine Mercadal > On Sep 13,

Re: [go-nuts] Re: go mod dependency hell is real

2019-09-14 Thread Jakob Borg
On 14 Sep 2019, at 08:32, Antoine Mercadal wrote: > > Hey, > > Then why is it called mvs? I don't understand what package system would give > me 1.3.49, if I require 1.2.0 and my dependency requires 1.1.0. > > I'll read a bit more about it, but you may have decreased my level of go > module

Re: [go-nuts] Re: go mod dependency hell is real

2019-09-14 Thread roger peppe
On Sat, 14 Sep 2019, 07:32 Antoine Mercadal, wrote: > Hey, > > Then why is it called mvs? I don't understand what package system would > give me 1.3.49, if I require 1.2.0 and my dependency requires 1.1.0. > Any time you don't understand why the versions have resolved in a particular way, I'd

[go-nuts] Who can explain more on the "upgrade" module version selector?

2019-09-14 Thread T L
The doc https://golang.org/cmd/go/#hdr-Module_queries says: The string "upgrade" is like "latest", but if the module is currently > required at a later version than the version "latest" would select (for > example, a newer pre-release version), "upgrade" will select the later > version

[go-nuts] Re: select on slice of channels

2019-09-14 Thread Nate Finch
You're better off funnelling everything into a single channel. There's little real difference between reading from one channel that N things write to, and reading from N channels that have one writer each. -- You received this message because you are subscribed to the Google Groups

Re: [go-nuts] Who can explain more on the "upgrade" module version selector?

2019-09-14 Thread 'Axel Wagner' via golang-nuts
Can you explain more specifically what you don't understand? The example seems pretty clear: Say you currently require the latest master commit (e.g. by using a pseudo-version), which is a couple commits ahead of the latest released version, then "latest" will select the release, while "upgrade"

[go-nuts] Re: go mod dependency hell is real

2019-09-14 Thread ariebrainware
Update ugorji to v1.7 works for me -- 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 golang-nuts+unsubscr...@googlegroups.com. To view this discussion on the web

Re: [go-nuts] Re: go mod dependency hell is real

2019-09-14 Thread Jakob Borg
On 14 Sep 2019, at 01:52, anto...@aporeto.com wrote: but require 1.2.0 will not work if another dependency requires the same package at version 1.1.0 thanks to mvs. So either I'm wrong and I did not understand mvs, in that case I would like to get enlighten, or I

Re: [go-nuts] Re: go mod dependency hell is real

2019-09-14 Thread Chris Broadfoot
Is this the issue you came across the other day, Jean? On Fri, Sep 13, 2019, 11:32 PM Antoine Mercadal wrote: > Hey, > > Then why is it called mvs? I don't understand what package system would > give me 1.3.49, if I require 1.2.0 and my dependency requires 1.1.0. > > I'll read a bit more about

[go-nuts] regarding regex package

2019-09-14 Thread Doug Clark
There’s a pure Go (no cgo needed) regexp engine that supports lookahead and lookbehind here: https://github.com/dlclark/regexp2 However, and I say this as someone who maintains that regex library, use this type of regex with caution. I would highly recommend changing your code to use the

Re: [go-nuts] Use of NoMethod type for custom marshaling

2019-09-14 Thread Sathish VJ
Yes, that makes sense. Thank you. The example I wrote was concocted. But I've seen others do it on their own types too, which didn't make sense at all. Maybe they were just copy-pasting similar code from elsewhere. On Saturday, 14 September 2019 20:20:49 UTC+5:30, Ben Burwell wrote: > > On