[go-nuts] Go modules and project-local imports.

2019-12-03 Thread Andrei Avram
Are you looking for replace and v0.0.0? https://github.com/golang/go/wiki/Modules#when-should-i-use-the-replace-directive -- 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 e

[go-nuts] time.Now.UnixNano() incorrect under windows7?

2019-03-23 Thread Andrei Avram
I ran into time issues on Windows, too: https://groups.google.com/forum/m/#!topic/golang-nuts/W5MqeB1Ai_k -- 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] Why not a mixture of value and pointer receiver?

2019-01-22 Thread Andrei Avram
If it's about a method you've defined on a pointer and you want to call it on the value: https://play.golang.org/p/zMVivcaXrf3 -- 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

[go-nuts] Opinions on monorepo multi-module build strategy

2019-01-21 Thread Andrei Avram
Hello, Could you show the layout of your repository? -- 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. For more options,

Re: [go-nuts] performance optimization

2019-01-15 Thread Andrei Avram
Not sure what your need is, but maybe you need time.Since instead of saving the start time and substracting it from time.Now. -- 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

Re: [go-nuts] Trivial(?) Go v2 proposal: Named goroutines and/or named nested funcs

2018-11-23 Thread Andrei Avram
What's the need for this? -- 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. For more options, visit https://groups.google.

Re: [go-nuts] Possible issue with math.Floor on Linux

2018-05-05 Thread Andrei Avram
12 * 3) seconds := -1 * int(now.Sub(datetime).Seconds()) a := 29030400 x := float64(seconds)/float64(a) fmt.Println("input:", x, "floor:", math.Floor(x)) } Result on both systems: input: 3 floor: 3. Thank you all! On Saturday, May 5, 2018 at 7:54:27 AM UTC+3, Andrei Avram

Re: [go-nuts] Possible issue with math.Floor on Linux

2018-05-04 Thread Andrei Avram
gt; > On Fri, 4 May 2018 at 21:56, Andrei Avram > wrote: > >> This code is extracted from something real. Someone on the team noticed >> the unit tests (which I wrote on a Linux machine) were failing on their >> Windows machine. >> I'll continue studying this

Re: [go-nuts] Possible issue with math.Floor on Linux

2018-05-04 Thread Andrei Avram
you start doing some real processing, the difference between > time.Now() invocations becomes non-zero, that is this "issue" doesn't > reproduce with "real" practical programs. > > > On Fri, May 4, 2018 at 10:26 PM, Andrei Avram > wrote: > >&

Re: [go-nuts] Possible issue with math.Floor on Linux

2018-05-04 Thread Andrei Avram
Windows -- at least in this specific scenario. > > Peter > > > On Fri, May 4, 2018 at 9:33 PM, Andrei Avram > wrote: > >> Peter and Ian, you are both wright regarding the printing. Still, on >> Linux I have different values than on Go Playground. >> >>

Re: [go-nuts] Possible issue with math.Floor on Linux

2018-05-04 Thread Andrei Avram
; b is slightly less than 3 because there is a bit of time between the two > calls to time.Now(). > > If you substitute this: > fmt.Printf("input: %20.18f\n", b) > > you get something like > input: 2.99965553350911 > > HTH > Peter > > On Fri, May 4

[go-nuts] Possible issue with math.Floor on Linux

2018-05-04 Thread Andrei Avram
Hello everyone, Today I ran into a situation that is strange to me. I ran the following code on two Linux machines (go run floor.go), on two Windows ones, and on Go Playground. package main import ( "time" "math" ) func main() { datetime := time.Now().Add(time.Hour * 24 * 7 * 4 * 12 * 3) seco