Hi ,
is there a way to acces go module information programmatically?
Background: I am currently using spf13's cobra. It currently only works
with packages inside GOPATH.
Is there a clean way to identify if the current working directory is a go
module and to get module information from go.mod
rt; it removes the
> monotonic time part. It just happens that the nanoseconds are zero on the
> "clock" on play:
>
> https://play.golang.org/p/Kdq_SDTi664
>
> To remove the subsecond part use .Truncate(time.Second) (or the
> corresponding Round of course)
>
&
Hi, here is something I have been puzzled for a few days now.
On my OSX machine rounding/truncating of time.Time values apparently does
not remove the nanoseconds component as documented when calling
Truncate(0)/Round(0).
On play.golang.org it works as expected:
https://play.golang.org/p/NXyh
> On Fri, Aug 11, 2017 at 12:43 PM Jens Hausherr
> wrote:
>
> > Is the documentation wrong in this case or am I just missing the case
> where nil is returned?
>
> The docs are correct: https://play.golang.org/p/6fiID64IAt
>
>
> --
>
> -j
>
--
You received th
Hi,
I was using some Regexp and noted that all functions are documented to
return 'nil' if the RE does not match.
I was using FindSubmatchString(s string) ad got an empty string array when
the expression did not match a string.
Example: https://play.golang.org/p/_kSYXM5e_j
Is the documentatio
Thanks for the insights.
Am Donnerstag, 12. Januar 2017 21:02:21 UTC+1 schrieb Dave Cheney:
>
> If you had this
>
> type I interface { ... }
> type T struct {
> sync.Mutex
> }
> var t T
> var i I = t
>
> This is a mistake because a *copy* of the contents of t is assigned to i.
>
> Every assig
Hi,
here is some code that puzzles me. I recently had defined an interface in a
project and had a struct implementing the interface an including
"sync.RWMutex" at the same time.
Sample Code (running): https://play.golang.org/p/DExfr3Izao
If you execute this code it just runs fine. If I "go vet