I think the error is trying to tell you the C reopen function takes a
pointer to a function and you are passing it a Go func. Try googling "cgo
pass function pointer". That should yield documents like
https://eli.thegreenplace.net/2019/passing-callbacks-and-pointers-to-cgo/
which should point you i
Hi,
You cannot pass f, which is a Go function, in a CGo call directly because
of the pointer passing rules. You need to create some wrappers, and I have
found this article
(https://eli.thegreenplace.net/2019/passing-callbacks-and-pointers-to-cgo)
very helpful.
That being said, I have a feeli
*Hi, all*
It's been a month since I started Golang.
But I was in a difficult situation. I need your help.
*C code*
int reopen (const char *fn, time_t check_interval_sec, int (*callback_func)
(int num_entry, char **entry), int retry);
*Go code*
func _Open(fileName string, intervalSec int, f
Hi all,
*C code*
int reopen (const char *fn, time_t check_interval_sec, int (*callback_func)
(int num_entry, char **entry), int retry);
*Go code*
func _Open(fileName string, intervalSec int, f func(C.int, **C.char) C.int)
int {
cFileName := C.CString(fileName)
defer C.free(unsafe.Poi
You are right Flush needs to write the header first, so the additional
header lines cannot be added by the server after Flush. The automatic
Content-Type might also not be written. A local proxy in front of your
server might be a simpler approach to measure full performance.
If the actual processi
My reply was to Salih but somehow my reply ended up appearing first.
According to the purego docs you don't need a compiler, essentially it
provides a means of opening a dll/so and registering and calling functions
within the dll/so.
On Tuesday, November 21, 2023 at 12:58:20 PM UTC Tamás Gulács
I know that there's purego https://github.com/ebitengine/purego but not
totally sure about it can preform without a compiler.
--
Regards,
Salih
--
You received this message because you are subscribed to the Google Groups
"golang-nuts" group.
To unsubscribe from this group and stop receiving
Which is what?
Please share with the golang-nuts list if you've found a solution!
Mark a következőt írta (2023. november 21., kedd, 11:54:11 UTC+1):
> Thank you, that looks just like what I want.
>
> On Tuesday, November 21, 2023 at 10:21:14 AM UTC Mark wrote:
>
>> I would like to be able to acce
Hi!
On Mon, Nov 20, 2023 at 10:51 PM Uli Kunitz wrote:
> You could convert the original ResponseWriter to a ResponseController and
> call Flush in your middleware before you measure the duration. Alternatively
> you can try to convert ResponseWriter to a http.Flusher and call Flush if the
> co
Thank you, that looks just like what I want.
On Tuesday, November 21, 2023 at 10:21:14 AM UTC Mark wrote:
> I would like to be able to access a dynamic C library (and ideally C++),
> i.e., `.so` or `.dll` _without_ using cgo, i.e., without needing a compiler
> on the target platform.
> Python p
I would like to be able to access a dynamic C library (and ideally C++),
i.e., `.so` or `.dll` _without_ using cgo, i.e., without needing a compiler
on the target platform.
Python provides a `ctypes` module with this facility. Is there an
equivalent for Go?
--
You received this message because
11 matches
Mail list logo