Solved thanks to Daniel Martí; use `go list -json` and grab the Module
struct out of that.
On Tue, 2019-12-24 at 09:50 +1030, Dan Kortschak wrote:
> Say I have a package path, "host.org/user/depmodule/pkgdep", which is
> the path to a dependency of "host.org/user/repomain/pkgmain". The
> go.mod
Say I have a package path, "host.org/user/depmodule/pkgdep", which is
the path to a dependency of "host.org/user/repomain/pkgmain". The
go.mod file in host.org/user/repomain will have a line
"host.org/user/depmodule" in the require block. If I want to
programmatically find what the module path is
Looks the multiple trick is not a theory. That is cool!
I don't know if this is an issue known for a long time.
If it is not, I would file an issue some time later.
On Mon, Dec 23, 2019 at 1:04 PM Axel Wagner
wrote:
> Sorry for the off-list response, that was unintentional.
>
> I think it
If what you want is a) assume that a `func()` is pointer-shaped and b)
treat it as an unsafe.Pointer for use with atomics, then that's a problem
that - as all problems in computer science - can be solved with another
layer of indirection: https://play.golang.org/p/o0DvCxPTG1O
As Jan mentioned, a
Sorry for the off-list response, that was unintentional.
I think it might be okay, but I could also think of a couple of reasons
against it. AFAIK, Go programs for the playground are compiled with a
patched stdlib (at least they used to be, to do the faketime-stuff. I don't
know if we're already
On Mon, Dec 23, 2019 at 6:41 PM wrote:
>> > But I cannot find any way of assigning a value to the function pointer `f`
>> > even using the `unsafe` package.
>>
>> https://play.golang.org/p/qP5kuSCW6dO
>
> Thanks, unfortunately the asm shows that what gets into `f` is the stack
> address of
> > But I cannot find any way of assigning a value to the function pointer
> `f` even using the `unsafe` package.
>
> https://play.golang.org/p/qP5kuSCW6dO
>
Thanks, unfortunately the asm shows that what gets into `f` is the stack
address of `f0` and not the address of the function:
LEAQ
This is a question about organizing table tests.
I believe the most common idiom for writing table tests is to store test
cases in a slice of structs like in the example from
https://github.com/golang/go/wiki/TableDrivenTests
;(, looks the last comment doesn't appear in go-nuts.
On Mon, Dec 23, 2019 at 9:37 AM T L wrote:
>
> > However, the playground has no GOROOT or build cache or anything
> available: https://play.golang.org/p/RPGwtZSJSPQ
>
> But, isn't it ok to let the playground own a GOROOT?
>
> On Mon, Dec 23,
> by Axel Wagner:
> However, the playground has no GOROOT or build cache or anything
available: https://play.golang.org/p/RPGwtZSJSPQ
But, isn't it ok to let the playground own a GOROOT?
--
You received this message because you are subscribed to the Google Groups
"golang-nuts" group.
To
> However, the playground has no GOROOT or build cache or anything
available: https://play.golang.org/p/RPGwtZSJSPQ
But, isn't it ok to let the playground own a GOROOT?
On Mon, Dec 23, 2019 at 5:47 AM Axel Wagner
wrote:
> Parsing is not the problem, type-checking is. For that, the
>
On Mon, Dec 23, 2019 at 2:49 PM wrote:
> But I cannot find any way of assigning a value to the function pointer `f`
> even using the `unsafe` package.
https://play.golang.org/p/qP5kuSCW6dO
Note that while you can a pointer to a function, you rarely need that.
Function is just a value like int
Hello,
The following Go program has a valid syntax:
https://play.golang.org/p/V7bIGnTu1fb
But I cannot find any way of assigning a value to the function pointer `f`
even using the `unsafe` package.
My main reason for willing this is to be able to:
- atomically load a dynamic address.
- avoid
Hi Ian,
Yes, sorry I forgot to specify I was using the standard go compiler.
Thank you for your answer!
Le sam. 21 déc. 2019 à 07:49, Ian Lance Taylor a écrit :
> On Fri, Dec 20, 2019 at 5:07 PM Michel Levieux
> wrote:
> >
> > I was working on a project and for simplicity reasons I just
I made the same mistake as this link -->
https://stackoverflow.com/q/48845724/12569565
Yes this is relevant. I thought you'd look under the Ldflags. So I made
weird and ignored it.
It worked when I placed the DLLs in the main directory.
Thank you so much.
23 Aralık 2019 Pazartesi 08:49:50
15 matches
Mail list logo