Re: [go-nuts] CPU profiling with pprof

2019-09-09 Thread Ian Lance Taylor
On Fri, Sep 6, 2019 at 8:36 PM Vincent Blanchon wrote: > > The documentation of the profiling > (https://blog.golang.org/profiling-go-programs) explains that: "Go program > stops about 100 times per second". > However, in the code, I could see that the collector has a sleep of 100ms > https://g

Re: [go-nuts] Re: Go 1.13 is released

2019-09-09 Thread Ian Lance Taylor
On Sun, Sep 8, 2019 at 7:46 AM stefan via golang-nuts wrote: > > Please release 1.13.1 to fix the "xerrors" breakage: > https://github.com/golang/go/issues/32246 As far as I know, there is no breakage with the up to date version of golang.org/x/xerrors. If you are having trouble, please open an

Re: [go-nuts] go build reports relocation target not defined for ABI0 (but is defined for ABIInternal)

2019-09-09 Thread Ian Lance Taylor
On Mon, Sep 9, 2019 at 7:57 PM Zhang Chao wrote: > > Thanks for your interpretation. So is there any workaround? Don't try to call an internal runtime package function. Call a Go function defined in your own package that calls the print builtin. Ian > On Tuesday, September 10, 2019 at 10:55:0

Re: [go-nuts] go build reports relocation target not defined for ABI0 (but is defined for ABIInternal)

2019-09-09 Thread Zhang Chao
Hello! Thanks for your interpretation. So is there any workaround? On Tuesday, September 10, 2019 at 10:55:00 AM UTC+8, Ian Lance Taylor wrote: > > On Mon, Sep 9, 2019 at 8:09 AM Zhang Chao > > wrote: > > > > I'm trying to write a tiny go program with a SayHello function written > by assembly

Re: [go-nuts] go build reports relocation target not defined for ABI0 (but is defined for ABIInternal)

2019-09-09 Thread Ian Lance Taylor
On Mon, Sep 9, 2019 at 8:09 AM Zhang Chao wrote: > > I'm trying to write a tiny go program with a SayHello function written by > assembly. > When I build it, the go build command giving me an error message: > > # bar > main.asmSayHello: relocation target runtime.printstring not defined for ABI0

Re: [go-nuts] Re: Running golang compiled binary on QNX

2019-09-09 Thread Adrian Petrescu
On 09/09 11:30AM, scab...@gmail.com wrote: It's been at least 18 months since this question was asked. Has anything changed? On Tuesday, January 30, 2018 at 4:44:42 PM UTC-5, sbez...@cisco.com wrote: Hello, I was wondering if anybody managed to get golang compiled binary to run on 32-bit QNX

Re: [go-nuts] Re: Expectations for errors.Is/As with error trees

2019-09-09 Thread 'Abhinav Gupta' via golang-nuts
Hey, Thanks for your response. Although we were unsure about this at first (which is why we started this thread), after further discussion we agree that this API makes sense. Part of the discussion is summarized below for others trying to make a similar decision, and to help plan future APIs aroun

Re: [go-nuts] Is there a preferred REDIS driver or go psckage?

2019-09-09 Thread Steven Hartland
https://github.com/gomodule/redigo/ written by Gary Burd is still maintained. We actively use it in production heavily. On Mon, 9 Sep 2019 at 19:19, joe mcguckin wrote: > > > Thanks, > > Joe > > -- > You received this message because you are subscribed to the Google Groups > "golang-nuts" group.

[go-nuts] Re: [ANN] CBOR Library - Small, safe, and easy CBOR encoding and decoding (for WebAuthn, etc.) in Go

2019-09-09 Thread Faye Amacker
Answers to some questions received today: *Is the API stable?* There's no plan to change the API -- but I wanted to leave room to improve the API based on initial feedback. The API will always be backwards compatible unless the major version number changes. *Is this production ready?* Curren

Re: [go-nuts] Is there a preferred REDIS driver or go psckage?

2019-09-09 Thread Mhd Shulhan
In the following redis page: https://redis.io/clients#go you can see list of Go packages, the recommended ones are marked with star; while package with smile icon mark packages that have activities within last six months. -- You received this message because you are subscribed to the Google

[go-nuts] Re: Running golang compiled binary on QNX

2019-09-09 Thread scabooz
It's been at least 18 months since this question was asked. Has anything changed? On Tuesday, January 30, 2018 at 4:44:42 PM UTC-5, sbez...@cisco.com wrote: > > Hello, > > I was wondering if anybody managed to get golang compiled binary to run on > 32-bit QNX? > > I compiled it with GOARCH=3

[go-nuts] Is there a preferred REDIS driver or go psckage?

2019-09-09 Thread joe mcguckin
Thanks, Joe -- 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. To view this discussion on the web visit https://groups.

Re: [go-nuts] html/template escaping problem

2019-09-09 Thread Jens-Uwe Mager
This gives me the output: {{test}} So this does not work at all. On Monday, September 9, 2019 at 4:20:06 PM UTC+2, Kurtis Rader wrote: > > You have > > href="{{safeurl .href}}", > > Shouldn't that be "safejs"? Using "safehref" is causing the string to be > hex encoded as a URL. Which mean

[go-nuts] go build reports relocation target not defined for ABI0 (but is defined for ABIInternal)

2019-09-09 Thread Zhang Chao
Hello! I'm trying to write a tiny go program with a SayHello function written by assembly. When I build it, the go build command giving me an error message: # bar main.asmSayHello: relocation target runtime.printstring not defined for ABI0 (but is defined for ABIInternal) Here are the codes.

Re: [go-nuts] How Gmail API refreshes token?

2019-09-09 Thread Dimas Prawira
I never use Gmail API, maybe I will do dumb solution, running the sample in local and see how it is going on. On Mon, Sep 9, 2019 at 11:59 AM Grigorii Tkachuk wrote: > I'm looking into this example > https://github.com/gsuitedevs/go-samples/blob/master/gmail/quickstart/quickstart.go > and > I

Re: [go-nuts] What is the memory order when select on multiple channels that one is closing and the other is receiving?

2019-09-09 Thread 'Axel Wagner' via golang-nuts
Hey, On Mon, Sep 9, 2019 at 9:55 AM changkun wrote: > Here comes with more interesting points. My "intuitive" comes from this > scenario: > I have an unbuffered channel "closedCh" that indicates if a network > connection is closed, a timer handles for heartbeat detection and polls > some data, i

Re: [go-nuts] html/template escaping problem

2019-09-09 Thread Kurtis Rader
You have href="{{safeurl .href}}", Shouldn't that be "safejs"? Using "safehref" is causing the string to be hex encoded as a URL. Which means most special chars will be converted to hex representation. On Mon, Sep 9, 2019 at 4:53 AM Jens-Uwe Mager wrote: > I am having a problem to properly

Re: [go-nuts] How Gmail API refreshes token?

2019-09-09 Thread burak serdar
On Sun, Sep 8, 2019 at 10:59 PM Grigorii Tkachuk wrote: > > I'm looking into this example > https://github.com/gsuitedevs/go-samples/blob/master/gmail/quickstart/quickstart.go > and I do not understand why it refreshes "token.json". On line 45 we are > passing token itself but not a path to tok

Re: [go-nuts] Re: x/mobile: Samples for reverse binding in gomobile

2019-09-09 Thread Elias Naur
On Mon Sep 9, 2019 at 3:09 AM Jay Sharma wrote: > > *Next I want to try with my own classes in java.. I want to define class > and call it from go. * > *Can you please suggest, in that case how to build with gomobile ?* > I think you can use the -classpath option to gomobile. -- elias -- You

[go-nuts] html/template escaping problem

2019-09-09 Thread Jens-Uwe Mager
I am having a problem to properly escape javascript urls in my templates. I do have the situation where I build a template that is having javascript urls that are from variables in the go program (read from yaml files). The go program generates static html, but the html is supposed to use moust

[go-nuts] Re: x/mobile: Samples for reverse binding in gomobile

2019-09-09 Thread Jay Sharma
Hello @elias Thank you for reply. I have tried the sample with reverse binding: import ( "Java/java/lang/System" ) func JavaCall() { t := System.CurrentTimeMillis() log.Println("Init", "[Test] Called java function return value is: ", t); } Built the above with gomob

Re: [go-nuts] What is the memory order when select on multiple channels that one is closing and the other is receiving?

2019-09-09 Thread changkun
Sincerely sorry for the typo of your name :( Axel -- 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. To view this discussio

Re: [go-nuts] What is the memory order when select on multiple channels that one is closing and the other is receiving?

2019-09-09 Thread changkun
Hi Alex, Thank you for giving such great clarification. You thought is more sophisticated than me. First: The close *does* happen-before the case clause of the select for the > closed channel, as per the memory model. > Indeed, no question here. > Second: If you actually establish an orde