[go-nuts] Re: For loop in go templating

2017-12-11 Thread Miki Tebeka
You can probably organize the data a bit before sending it to the template and use "range". Something similar to https://play.golang.org/p/us5ABFoaeB On Tuesday, December 12, 2017 at 6:43:06 AM UTC+2, Josh Cox wrote: > > Why is there not a 'for' action in go templating >

Re: [go-nuts] For loop in go templating

2017-12-11 Thread Ian Lance Taylor
On Mon, Dec 11, 2017 at 6:41 PM, Josh Cox wrote: > > Why is there not a 'for' action in go templating? > > I seem to get punted for asking such blasphemy! > > my stackoverflow question > > and my [github >

[go-nuts] For loop in go templating

2017-12-11 Thread Josh Cox
Why is there not a 'for' action in go templating ? I seem to get punted for asking such blasphemy! my stackoverflow question and my [github

[go-nuts] net/http GET request with params

2017-12-11 Thread Darko Luketic
Hello, I'm really puzzled. I tried Set and Add. Request.Url.Query() is empty Do I have to build the uri first before and then passing it to http.NewRequest? func HybridFlow() { response_type := "code id_token" scope := "openid profile email" nonce := uniuri.New() state :=

Re: [go-nuts] Breaking change: reflect.StructOf: field 0 has no name

2017-12-11 Thread Ian Lance Taylor
On Mon, Dec 11, 2017 at 11:23 AM, wrote: > Is there any reason why this breaking change is not mentioned in any of the > release notes? The original code did not document how to create embedded fields, and the support that it did have did not work correctly (it did not set the

Re: [go-nuts] Breaking change: reflect.StructOf: field 0 has no name

2017-12-11 Thread mihai
Is there any reason why this breaking change is not mentioned in any of the release notes? On Monday, December 11, 2017 at 8:22:28 AM UTC+2, Ian Lance Taylor wrote: > > On Sun, Dec 10, 2017 at 8:46 AM, wrote: > > > > I had some code that I didn't touch for a while and now it

Re: [go-nuts] XML Pretty Print

2017-12-11 Thread Sam Whited
On Mon, Dec 11, 2017, at 09:12, Mandolyte wrote: > At my previous company I had a Go program that would take any XML > document > and output it as XML in a nicer human readable format, i.e., pretty > printed. I've trying to find it again, but my searches have not turned up > any. Perhaps I had

[go-nuts] Re: XML Pretty Print

2017-12-11 Thread C Banning
Well, pretty much all the functionality you need is in clbanning/mxj/xmlseq.go ... so you could cut it out and clean it up a bit. On Monday, December 11, 2017 at 9:03:12 AM UTC-7, C Banning wrote: > > https://godoc.org/github.com/clbanning/mxj#BeautifyXml does that - but > you've got to lug

[go-nuts] Re: Why are can't struct field types not be used as types

2017-12-11 Thread anmol via golang-nuts
OP said he does not want to litter his code with helper types. On Sunday, December 10, 2017 at 1:30:33 PM UTC-5, Kevin Malachowski wrote: > > Why not name the inner type? https://play.golang.org/p/8hyMLUVbCp -- You received this message because you are subscribed to the Google Groups

[go-nuts] os.Stat and os.IsNotExist on Windows

2017-12-11 Thread Petr Shevtsov
Greetings, gophers! I've spotted rather strange behavior of os.IsNotExist on Windows. This snippet[1] s := "http://example.com/; fi, err := os.Stat(s) if os.IsNotExist(err) { fmt.Println("Not a file") return } mode := fi.Mode() if mode.IsRegular() { fmt.Println("File") } works perfectly on

re:[go-nuts] liteide x33.1 released

2017-12-11 Thread visualfc
liteide x33.1 release integrated gocode and gotools build on go1.10beta1 and support go1.9 / go1.10beta1 or lower Sent from Gmail -- 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,

[go-nuts] liteide x33.1 released

2017-12-11 Thread visualfc
Hi all. LiteIDE x33.1 released! This version adjust menu, add tools menu, enable edit menu for anytime, renamed part of the tool window. Add quick open command action (ctrl+shift+p/command+shift+p). Change  quick open files use thread for fast and cancel. Integrated gomodifytags and add gui 

[go-nuts] XML Pretty Print

2017-12-11 Thread Mandolyte
At my previous company I had a Go program that would take any XML document and output it as XML in a nicer human readable format, i.e., pretty printed. I've trying to find it again, but my searches have not turned up any. Perhaps I had written myself, but I didn't think so. Does anyone have a

[go-nuts] Re: GoLang dependency -> dep installation Issue , Burrow golang tool issues

2017-12-11 Thread Arun Singh
*No* I have not been able to install the dep tool, I used this dep link to install tool. ~ Regards Arun If you're interested in hacking on dep, you can install via go get: go get -u github.com/golang/dep/cmd/dep On Saturday, 9 December 2017 01:45:02 UTC+5:30,

Re: [go-nuts] Best way to add retries to existing library using net/http.Client?

2017-12-11 Thread Kevin Conway
A few of us had a very short discussion on the subject here: https://groups.google.com/forum/#!topic/golang-nuts/rjYdaFM5OBw Almost all go code I've seen that requires an HTTP client takes an `*http.Client` as one of the parameters. This doesn't leave consumers with many other options than to