On Thu, Jul 29, 2021 at 9:13 PM Carl wrote:
> Is there a way to write a unit test that simulates a change in the wall
> clock for a time.Time value?
>
Here is an example of how the Elvish shell stubs the time.After() function
to verify its builtin "sleep" command behaves correctly without having
On Fri, Jul 30, 2021 at 12:13 AM Carl wrote:
> Hi,
>
> Is there a way to write a unit test that simulates a change in the wall
> clock for a time.Time value?
>
I use a combination of two approaches to simulate the passage of time
(often both work together):
- have functions a `now` argument
Hi All,
Can someone provide an example code for implementing communication
between Golang and android.
--
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
fub is declared outside the for loop and io.Copy(&fub, &q) will append to
the buffer.
On Thu, Jul 29, 2021 at 11:41 AM hyogy hyogy wrote:
> I am more and more convinced that *io.Copy(&fub, &q)* is the problem
>
> Il giorno mercoledì 28 luglio 2021 alle 17:11:40 UTC+2 hyogy hyogy ha
> scritto:
>
The go command only applies replace directives from the main module's
go.mod file. In this example, replace directives in your module B would be
applied, but replace directives in A (or any other dependency) would be
ignored. This is important for avoiding conflicts that can't easily be
resolved (f
Also, though I think it's easy to slip into tests that test the mocks if
you don't pay attention, you can have arbitrarily numerous mocks without
having bad tests. Unit tests are not designed to reflect your runtime
environment at all, they're here to make sure your function (program unit)
does wha