Thanks for your response!
How does it keep alive for at least the duration of the cgo call? After the
pointer is copied and passed to the cgo call, it will become unreachable.
After it is swept by GC, pointers point to that part of memory will no
longer exist on the Go-managed heap.
Do you mea
The allocation is in go, and assembly never modifies the size of the
backing array. Assembly only ever modifies len, which is the len of the
slice and not the backing array.
On Thursday, 21 March 2019 22:18:29 UTC-7, Tamás Gulácsi wrote:
>
> 2019. március 22., péntek 6:06:06 UTC+1 időpontban Tom
2019. március 22., péntek 6:06:06 UTC+1 időpontban Tom a következőt írta:
>
> Still errors I'm afraid :/
>
> On Thursday, 21 March 2019 21:54:59 UTC-7, Ian Lance Taylor wrote:
>>
>> On Thu, Mar 21, 2019 at 9:39 PM Tom wrote:
>> >
>> > I've been stuck on this for a few days so thought I would ask
Still errors I'm afraid :/
On Thursday, 21 March 2019 21:54:59 UTC-7, Ian Lance Taylor wrote:
>
> On Thu, Mar 21, 2019 at 9:39 PM Tom >
> wrote:
> >
> > I've been stuck on this for a few days so thought I would ask the brains
> trust.
> >
> > TL;DR: When I have native amd64 instructions muta
On Thu, Mar 21, 2019 at 9:39 PM Tom wrote:
>
> I've been stuck on this for a few days so thought I would ask the brains
> trust.
>
> TL;DR: When I have native amd64 instructions mutating (updating the len +
> values of a []uint64) a slice, I experience spurious & random memory
> corruption when
I've been stuck on this for a few days so thought I would ask the brains
trust.
*TL;DR: *When I have native amd64 instructions mutating (updating the len +
values of a []uint64) a slice, I experience spurious & random memory
corruption when under heavy load (# runnable goroutines > MAXPROCS, do
On Wednesday, March 20, 2019 at 12:07:49 PM UTC-7, ohir wrote:
>
> Adam Langley is a well recognized expert in the field. I trust in his
> decisions.
+1
> Validated is exact version of boringcrypto: 24e.d6f5
> It will not lose its validation even if it has a bug.
> If it will fix thi
I’m not quite sure but I think you can do this easier using JS.
On Thu, 21 Mar 2019 at 5:24 PM, wrote:
> I try to make a pdf from my HTML and CSS. In CSS file there have
> some Paged Media Models.
> https://github.com/SebastiaanKlippert/go-wkhtmltopdf/ I use this library
> to generate my pdf but
Is there a command that does something like `go list -m ` but
also outputs the sum for the module and module's go.mod? Other than
`grep go.sum`.
thanks
Dan
--
You received this message because you are subscribed to the Google Groups
"golang-nuts" group.
To unsubscribe from this group and stop
I just found out that removing "" from arguments seems to be somewhat
working, so if we do:
{" --user-data-dir=C:\ProfileTest 1",
" --load-extension="C:\test",
Golang automatically adds the " when running the command, in fact the
command line -as per chrome chrome:version- is correct. The e
On Wed, Mar 20, 2019 at 10:56 PM Cholerae Hu wrote:
>
> package main
>
> // void a(long *p) {}
> import "C"
>
> import (
> "unsafe"
> )
>
> //go:noinline
> func b() {
> x := int64(0)
> C.a((*C.long)(unsafe.Pointer(&x)))
> // do something without x
> }
>
> func main() {
> b()
> }
>
> x should be co
As a total work-around you can always write start_chrome.bat::
your command to launch chrome.
and then from go execute as: "cmd.exe", "/k", "start_chrome.bat"
(double-check the "/k", I'm writing from memory).
Also, to me the red flag is using -foo="quoted argument".parts.
On windows, cmd-line a
On Thu, 21 Mar 2019 at 16:14, wrote:
> Two things to note about this.
>
> First, if the "everything else" deferred to might include a return
> statement, then this could result in the same "silent failure" behavior.
>
Yup, don't do that :)
> Secondly - use this pattern with great caution. It i
Just tried it out, unfortunately, it keeps having the same error, even if I
apply this format to the rest of the arguments
El jueves, 21 de marzo de 2019, 13:46:29 (UTC-3), Jake Montgomery escribió:
>
> It is likely that the spaces before the command line arguments is
> confusing the Chrome par
It is likely that the spaces before the command line arguments is confusing
the Chrome parser. Try removing them for every item in Args, and it may
work.
On a style note, I would use:
AppCommand:=
`C:\Users\User\AppData\Local\Google\Chrome\Application\chrome.exe`
instead of:
AppCommand:=
"C
Two things to note about this.
First, if the "everything else" deferred to might include a return
statement, then this could result in the same "silent failure" behavior.
Secondly - use this pattern with great caution. It is critical to confirm
that a double close on ifDB is explicitly allowed
Hello,
I'm trying to launch Chrome from Go under windows, some of the arguments
I'm passing have custom paths in it and it seems that go is sanitizing
these arguments and not recognizing the paths. Basically it seems to be
appending the application path into the arguments with a path.
Code is
The first step is certainly to consistently check the error returns of
all your system calls. Right now you are ignoring the error returns
of your SHMAT calls.
Ian
On Thu, Mar 21, 2019 at 8:24 AM <615912...@qq.com> wrote:
>
> Here is my code.
> package main
>
> /*
> #include
> #include
> #incl
I try to make a pdf from my HTML and CSS. In CSS file there have some Paged
Media Models. https://github.com/SebastiaanKlippert/go-wkhtmltopdf/ I use
this library to generate my pdf but the problem is the Print CSS didn't
work well. I am searching for some idea and feel free to suggest me if you
Here is my code.
package main
/*
#include
#include
#include
static void memcpy_c(char *dest, int offs1, char *src, int offs2, int cnt) {
if (src == 0 || dest == 0) {
printf("a null ptr.\n");
return;
}
int a = 0;
long i = 0;
memcpy(dest + offs1, src+offs2, cnt);
while (1){
if (i >= cnt) {
break;
On Thu, 21 Mar 2019 11:56:21 +0530 pradam wrote:
> I have implement below code, but body not showing up, so whats wrong
> with the code?
>
> [..]
>
> _, err = fmt.Fprintf(wc, "This is the email body")
> if err != nil {
> log.Fatal(err)
> }
>
> [..]
You are not sending any header fields; an e
I try to use net.ListenConfig, but fail
can someone give example ?
--
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 m
* pradam [190321 02:27]:
> I have implement below code, but body not showing up, so whats wrong
> with the code?
IWFM. I only changed the server, sender email and recipient email, and
the mail was delivered (without a Subject) with the correct body.
You didn't get any errors? You say the body
Thanks
On Thursday, March 21, 2019 at 2:12:17 AM UTC-4, Josh Kamau wrote:
>
> In golang you have to mix and match various libraries.
> - For CSRF, I use http://www.gorillatoolkit.org/pkg/csrf
> - For password encryption, I use
> https://godoc.org/golang.org/x/crypto/bcrypt
>
> I like using gola
On Thursday, March 21, 2019 at 10:41:05 AM UTC+1, Amnon Baron Cohen wrote:
>
> The idiomatic Go way is to write
>
>defer ifDB.Close()
>
> Simple is better than clever.
>
> + Readability does matter.
>
>
Do you think logging the possible error from Close is clever?
If you want readability you c
This issue is why I like having idempotent close. Do:
defer ifDB.Close()
but also, after everything else is complete, do:
if err := ifDB.Close(); err != nil {
handle error case
}
That way if you return early on error your connection is still closed, but
you can still write th
The idiomatic Go way is to write
defer ifDB.Close()
Simple is better than clever.
+ Readability does matter.
And in situations where you really need to check that the connection was
successfully closed, and
you have a workable scheme for recovering from this situation, then write a
named
27 matches
Mail list logo