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
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-
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
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,
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
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.
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
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
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:
>
>&
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.
>>
>>
; 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
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
12 matches
Mail list logo