[go-nuts] Re: Partial Variable Assignment

2016-11-11 Thread paraiso . marc
No way, it only works in the same block : https://golang.org/ref/spec#Short_variable_declarations the for statement creates a new block . Le samedi 12 novembre 2016 03:49:35 UTC+1, so.q...@gmail.com a écrit : > > > I thought it was possible to do partial assignment where, if one variable >

Re: [go-nuts] Partial Variable Assignment

2016-11-11 Thread Gautam Dey
I think what is happening when you do the := is that the ok in there is getting shadowed (the for loop is creating a new block) and so the compiler see it as a new variable that is not being used. Sent from my iPhone > On Nov 11, 2016, at 18:49, so.qu...@gmail.com wrote: > > > I thought

[go-nuts] Re: [ANN] (GUI) Qt binding which supports Windows / macOS / Linux / Android / iOS / Sailfish OS / Raspberry Pi

2016-11-11 Thread Tong Sun
Cool! Does it support the declarative QML ? On Thursday, November 10, 2016 at 3:34:36 PM UTC-5, therecipe wrote: > > Hey everyone, > > I would like to officially announce the project I'm working on

[go-nuts] Re: [ANN] (GUI) Qt binding which supports Windows / macOS / Linux / Android / iOS / Sailfish OS / Raspberry Pi

2016-11-11 Thread therecipe
Thank you, I appreciate it :) Am Donnerstag, 10. November 2016 23:42:41 UTC+1 schrieb Rusco: > > Good to see some progress on the GUI front - I think you are up to > something ! > Rusco > > > > On Thursday, 10 November 2016 20:34:36 UTC, therecipe wrote: >> >> Hey everyone, >> >> I would like to

Re: [go-nuts] Why google cloud vision api cause memory issue when it is failed to detect

2016-11-11 Thread jba via golang-nuts
Please file an issue at https://github.com/GoogleCloudPlatform/google-cloud-java/issues. -- 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

Re: [go-nuts] go generate "pipelines"

2016-11-11 Thread Paul Jolly
> > Why not just run all those generate commands in a single go generate call, > such as a shell script or a go run? > >From go generate --help: *... Within a package, generate processes the source files in a package in > file name order, one at a time. **Within **a source file, generate runs >

Re: [go-nuts] go generate "pipelines"

2016-11-11 Thread Paul Jolly
Thanks for the feedback. > You would need to write the programs go generate is calling to be > idempotent, and have the second one exit quietly if the first hasn't run. > You would then either run go generate twice or have the first program run > go generate once it had completed. > Regarding

Re: [go-nuts] [ANN] httpsnoop, an easy way to capture http related metrics (response time, bytes written, and http status code)

2016-11-11 Thread Felix Geisendörfer
> On 11 Nov 2016, at 12:57, atd...@gmail.com wrote: > > Now, I don't know if it solves your issue but that's a quick thought. No, as explained in my previous e-mail, this doesn’t fit my requirements. Anyway, thanks for your input. :) -- You received this message because

[go-nuts] Re: Concurrency and order of execution

2016-11-11 Thread mspaulding06
Okay, that makes sense. I've updated my solution so that in the case that the channel only has a capacity of 1 the processing will be done without goroutines to ensure that it is done in serial. In the case that the channel capacity is larger then I don't care about how processing is

Re: [go-nuts] html/template modifies template outside of actions

2016-11-11 Thread Marvin Renich
* Ian Davis [16 06:04]: > On Fri, Nov 11, 2016, at 09:21 AM, Marvin Renich wrote: > > > the Execute method escapes the first character ('<' in " > "". This seems wrong to me, both logically and according to the > > documentation, which states in the fourth paragraph under

[go-nuts] Re: JSON parser

2016-11-11 Thread Sergio Hunter
Thanks so much all who help me, I appreciate it! Ok, for example: first row achieve: xÚ –Ûjã0 E ¥èÙ.:GWûWJ 2 e ¦} ù÷êb7Ú; yñòÖ> )º˜×Ÿoï?^ÿ ÿü5«Q+a ­{²yUY­>Í6[k&ónÖ‹9ŸÍ*b­ Œ¶çòX þ›Õ?/Ëu Éò¼äB~›õåRŸm{ êÛ_=˜Ì¶ü¼¹N—ÏW]x „Ym

Re: [go-nuts] Re: [ANN] httpsnoop, an easy way to capture http related metrics (response time, bytes written, and http status code)

2016-11-11 Thread atd...@gmail.com
The goal is to check whether a http.ResponseWriter is a wrapper around another http.ResponseWriter. If so, we can check what the wrappee implements besides ServeHTTP(...). Maybe it is itself a wrapper. Maybe it is a Hijacker or ReadCloser... If this wrappee is itself a wrapper, the logic is

Re: [go-nuts] FPDF question (jung-kurt)

2016-11-11 Thread Konstantin Khomoutov
On Fri, 11 Nov 2016 12:27:25 +0100 Arie van Wingerden wrote: > when I use AddFont I need a font specification in JSON format. > But I really have no idea what should go in such a JSON file. > > I had this: > > pdf.AddFont("Ravie", "B", "c:\\windows\\fonts\\RAVIE.TTF") > >

[go-nuts] FPDF question (jung-kurt)

2016-11-11 Thread Arie van Wingerden
Hi, when I use AddFont I need a font specification in JSON format. But I really have no idea what should go in such a JSON file. I had this: pdf.AddFont("Ravie", "B", "c:\\windows\\fonts\\RAVIE.TTF") which is obviously wrong, since it only points to the font location in Windows. Any help

Re: [go-nuts] Re: [ANN] httpsnoop, an easy way to capture http related metrics (response time, bytes written, and http status code)

2016-11-11 Thread Felix Geisendörfer
> I haven't thought too much about it but there is possibly an alternative > logic by having the wrappers add a Wrap() http.ResponseWriter that would > return the wrappee. > > So first, one would test for that Wrapper interface, then return the wrappee > if the test turns out to be positive.

[go-nuts] Re: [ANN] httpsnoop, an easy way to capture http related metrics (response time, bytes written, and http status code)

2016-11-11 Thread atd...@gmail.com
I haven't thought too much about it but there is possibly an alternative logic by having the wrappers add a Wrap() http.ResponseWriter that would return the wrappee. So first, one would test for that Wrapper interface, then return the wrappee if the test turns out to be positive. Then one

[go-nuts] html/template modifies template outside of actions

2016-11-11 Thread Marvin Renich
In this code (at https://play.golang.org/p/HVxzsn0_eC) package main import ( "fmt" "html/template" "os" ) var tmpl = ` {{range .}} {{.}}{{end}} ` var items = []string{"one", "two", "three"} func main() { var t, err = template.New("").Parse(tmpl) if err == nil {

Re: [go-nuts] How to conv [3]int to []int ?

2016-11-11 Thread steve tang
great, many thanks:) On Friday, November 11, 2016 at 4:06:01 PM UTC+8, kortschak wrote: > > That's not necessary. > > https://play.golang.org/p/_iHnithuxz > > What a[:] does is create a slice header with the address pointing to > the zeroth element of a. > > The code that is generated is

Re: [go-nuts] How to conv [3]int to []int ?

2016-11-11 Thread Dan Kortschak
That's not necessary. https://play.golang.org/p/_iHnithuxz What a[:] does is create a slice header with the address pointing to the zeroth element of a. The code that is generated is exactly the same for both (you can check this with go tool compile -S). On Thu, 2016-11-10 at 23:46 -0800,