Re: [go-nuts] Replace modules from command line

2019-08-05 Thread Peter Feichtinger
Thanks for that, this will come in handy for editing the go.mod file. But I'd like to avoid editing the file at all. On Monday, August 5, 2019 at 7:16:08 PM UTC+2, Paul Jolly wrote: > > Take a look at go mod edit > > https://golang.org/cmd/go/#hdr-Module_maintenance > > > > On Mon, 5 Aug 2019, 18

Re: [go-nuts] Upgrade to Go1.12.7 problem

2019-08-05 Thread Ian Lance Taylor
On Mon, Aug 5, 2019 at 5:56 PM Shane H wrote: > > I've done a bit of searching, and asked around, but not found an answer to my > (most likely self-inflicted) problem. > > I have been coding with Go 1.10 and 1.11 for a whiles, but I decided that it > was time to join the future and upgraded to 1

Re: [go-nuts] Question re fcns that return multiple values

2019-08-05 Thread Adrian Ho
On 6/8/19 11:38 AM, lgod...@gmail.com wrote: > For f1 defined as func f1(k1, k2, k3 int) (x1, x2 int) {..}  > and f2 defined as func f2(x,y int)           (xR int)       {..}  > > Why does the compiler complain about the call stmt  > f2 ( f1 (1,2,3)  )   ?? > It shouldn't. What little you posted is

Re: [go-nuts] Question re fcns that return multiple values

2019-08-05 Thread Jesse McNelis
On Tue, Aug 6, 2019 at 1:38 PM wrote: > For f1 defined as func f1(k1, k2, k3 int) (x1, x2 int) {..} > and f2 defined as func f2(x,y int) (xR int) {..} > > Why does the compiler complain about the call stmt > f2 ( f1 (1,2,3) ) ?? > I'm not sure what you're asking. The compiler

[go-nuts] Question re fcns that return multiple values

2019-08-05 Thread lgodio2
For f1 defined as func f1(k1, k2, k3 int) (x1, x2 int) {..} and f2 defined as func f2(x,y int) (xR int) {..} Why does the compiler complain about the call stmt f2 ( f1 (1,2,3) ) ?? -- You received this message because you are subscribed to the Google Groups "golang-nuts" g

Re: [go-nuts] Does module name has to start with a valid domain name?

2019-08-05 Thread isulsz1
Actually, one more thought. If we require to contain a dot, should we apply this check to the module name appears on the first line of the go.mod file? Currently I think the check is applied to the modules listed in "require" list, that means, I can define a module "foo", but not able to refer t

[go-nuts] Re: Upgrade to Go1.12.7 problem [SOLVED]

2019-08-05 Thread Shane H
On Tuesday, August 6, 2019 at 11:31:40 AM UTC+10, Shane H wrote: > > > > On Tuesday, August 6, 2019 at 10:56:42 AM UTC+10, Shane H wrote: >> >> Hi all, >> >> I've done a bit of searching, and asked around, but not found an answer >> to my (most likely self-inflicted) problem. >> >> I have been c

[go-nuts] Re: Upgrade to Go1.12.7 problem

2019-08-05 Thread Shane H
On Tuesday, August 6, 2019 at 10:56:42 AM UTC+10, Shane H wrote: > > Hi all, > > I've done a bit of searching, and asked around, but not found an answer to > my (most likely self-inflicted) problem. > > I have been coding with Go 1.10 and 1.11 for a whiles, but I decided that > it was time to j

Re: [go-nuts] Does module name has to start with a valid domain name?

2019-08-05 Thread SZ Li
I see. Makes sense. Thanks, Shizheng On Mon, Aug 5, 2019 at 7:04 PM Ian Lance Taylor wrote: > On Mon, Aug 5, 2019 at 12:33 PM wrote: > > > > We are using bazel to manage dependency and would like to migrate to > modules and use JFrog's module proxy. We have many private modules, starts > with

[go-nuts] Upgrade to Go1.12.7 problem

2019-08-05 Thread Shane H
Hi all, I've done a bit of searching, and asked around, but not found an answer to my (most likely self-inflicted) problem. I have been coding with Go 1.10 and 1.11 for a whiles, but I decided that it was time to join the future and upgraded to 1.12. It worked fine for the project I was creati

Re: [go-nuts] Does module name has to start with a valid domain name?

2019-08-05 Thread Ian Lance Taylor
On Mon, Aug 5, 2019 at 12:33 PM wrote: > > We are using bazel to manage dependency and would like to migrate to modules > and use JFrog's module proxy. We have many private modules, starts with a > name like "foo", and we specify the internal git repo in bazel. Based on the > understanding of m

[go-nuts] Does module name has to start with a valid domain name?

2019-08-05 Thread isulsz1
Hi, We are using bazel to manage dependency and would like to migrate to modules and use JFrog's module proxy. We have many private modules, starts with a name like "foo", and we specify the internal git repo in bazel. Based on the understanding of module proxy protocol, as long as the proxy r

Re: [go-nuts] Replace modules from command line

2019-08-05 Thread Paul Jolly
Take a look at go mod edit https://golang.org/cmd/go/#hdr-Module_maintenance On Mon, 5 Aug 2019, 18:45 Peter Feichtinger, wrote: > Hi Go Nuts, > > I have a rather unusual use case and I'm hoping for some input. > > For testing purposes, I want to build a Go binary with different versions > of

[go-nuts] Replace modules from command line

2019-08-05 Thread Peter Feichtinger
Hi Go Nuts, I have a rather unusual use case and I'm hoping for some input. For testing purposes, I want to build a Go binary with different versions of one of its dependencies. The only way I could think of was to modify the go.mod file to add a replace directive with the version I want to tes

Re: [go-nuts] Re: package-level structs vs package-level vars

2019-08-05 Thread B Carr
On Monday, August 5, 2019 at 9:33:08 AM UTC-6, burak serdar wrote: > > On Mon, Aug 5, 2019 at 9:20 AM B Carr > > wrote: > > > > Oh. I'm talking about env variables which a goroutine sets by using > os.Setenv() which to me implies OS env variables. Are those env variables > accessible by all

Re: [go-nuts] Re: package-level structs vs package-level vars

2019-08-05 Thread burak serdar
On Mon, Aug 5, 2019 at 9:20 AM B Carr wrote: > > > > On Monday, August 5, 2019 at 8:52:41 AM UTC-6, burak serdar wrote: >> >> On Mon, Aug 5, 2019 at 8:47 AM B Carr wrote: >> > >> > Is it safe to say that environment variables (accessible to all >> > goroutines) also live in the data segment? >>

Re: [go-nuts] Re: package-level structs vs package-level vars

2019-08-05 Thread B Carr
On Monday, August 5, 2019 at 8:52:41 AM UTC-6, burak serdar wrote: > > On Mon, Aug 5, 2019 at 8:47 AM B Carr > > wrote: > > > > Is it safe to say that environment variables (accessible to all > goroutines) also live in the data segment? > > No. > > When you say "environment variables", do y

Re: [go-nuts] Re: package-level structs vs package-level vars

2019-08-05 Thread burak serdar
On Mon, Aug 5, 2019 at 8:47 AM B Carr wrote: > > Is it safe to say that environment variables (accessible to all goroutines) > also live in the data segment? No. When you say "environment variables", do you mean OS env variables, or the variables visible to a goroutine? If you're talking about

[go-nuts] Re: package-level structs vs package-level vars

2019-08-05 Thread B Carr
Is it safe to say that environment variables (accessible to all goroutines) also live in the data segment? -- 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

[go-nuts] Re: Contracts Draft: why are method pointers allowed

2019-08-05 Thread alan . fox6
For those who haven't already noticed, I thought I'd point out that the draft design has now been changed (as Ian intimated it might be) so that contracts may now require a pointer method in some cases i.e. if the type parameter is T one can now specify that *T has a certain method. In particul

Re: [go-nuts] pushing too far reflect usage ? another attempts to pipline based processing

2019-08-05 Thread Sebastien Binet
Hi Clement, it's a nice investigation of the benefits and limits of using reflect. I guess it would also be as interesting to investigate what this library would look like if the current draft for generics were to be accepted :) -s On Sun, Aug 4, 2019 at 4:13 PM clement auger wrote: > You te