Re: [go-nuts] Re: [Proposal] Change how gofmt formats struct fields

2020-02-20 Thread Jan Mercl
On Wed, Feb 19, 2020 at 7:26 PM Wojciech S. Czarnecki wrote: > https://github.com/golang/go/issues/37299 "I propose to add an opt-in go fmt solution meant to minimize whitespace changes to the block where a code author hinted at desired comments position." I believe the absence of any gofmt kno

Re: [go-nuts] Re: [Proposal] Change how gofmt formats struct fields

2020-02-20 Thread Amnon BC
Good point Jan, and I totally agree. I noticed that the proposal states that it can only be implemented by the core team. I don't really understand the statement, as go fmt is written in Go and all the sources are available online. So it might be worth expanding this statement to explain why this

Re: [go-nuts] Re: [Proposal] Change how gofmt formats struct fields

2020-02-20 Thread Wojciech S. Czarnecki
Dnia 2020-02-20, o godz. 08:25:57 Amnon BC napisał(a): > Good point Jan, and I totally agree. > > I noticed that the proposal states that it can only be implemented by the > core team. > > I don't really understand the statement, as go fmt is written in Go and all > the sources are available on

Re: [go-nuts] Re: [Proposal] Change how gofmt formats struct fields

2020-02-20 Thread Wojciech S. Czarnecki
Dnia 2020-02-20, o godz. 09:10:22 Jan Mercl <0xj...@gmail.com> napisał(a): > I believe the absence of any gofmt knobs (opt-ins) is a feature that's > not going away. You can always use your private fork, if you want. I do not want anymore ;) Knob is there _mostly_ because of all the past code in

Re: [go-nuts] Re: [Proposal] Change how gofmt formats struct fields

2020-02-20 Thread Amnon Baron Cohen
> > Gofmt's style is no one's favorite, yet gofmt is everyone's favorite. > >From Go Proverbs. https://www.youtube.com/watch?v=PAAkCSZUG1c&t=8m43s Rob Pike answered this proposal in advance back in 2015. Wise words... -- You received

Re: [go-nuts] Re: [Proposal] Change how gofmt formats struct fields

2020-02-20 Thread Manlio Perillo
On Thursday, February 20, 2020 at 12:01:57 PM UTC+1, Amnon Baron Cohen wrote: > > Gofmt's style is no one's favorite, yet gofmt is everyone's favorite. >> > > > From Go Proverbs. > > https://www.youtube.com/watch?v=PAAkCSZUG1c&t=8m43s > > Rob

Re: [go-nuts] Re: [Proposal] Change how gofmt formats struct fields

2020-02-20 Thread David Riley
On Feb 20, 2020, at 8:35 AM, Manlio Perillo wrote: > > This is not a matter of style. It is a matter of having clean diffs in > commits. It is both. You may prioritize clean diffs, and I understand your reasons for that. Many other people prioritize readability over clean diffs. Neither side

Re: [go-nuts] Re: [Proposal] Change how gofmt formats struct fields

2020-02-20 Thread Robert Engels
Isn’t is easier to just set your diff display to ignore white space changes? Most modern IDEs have this option. > On Feb 20, 2020, at 7:59 AM, David Riley wrote: > > On Feb 20, 2020, at 8:35 AM, Manlio Perillo wrote: >> >> This is not a matter of style. It is a matter of having clean diffs

Re: [go-nuts] Re: [Proposal] Change how gofmt formats struct fields

2020-02-20 Thread Wojciech S. Czarnecki
Dnia 2020-02-20, o godz. 08:57:51 David Riley napisał(a): > I'm willing to be convinced otherwise. [...] > a new "magic" tab that won't be supported This proposal is not about some "magic tab". It is about a gofmt formatting recipe that allows for minimal changesets while keeping "pretty" aut

Re: [go-nuts] Re: [Proposal] Change how gofmt formats struct fields

2020-02-20 Thread Wojciech S. Czarnecki
> ("Smart tabs" were mentioned by Manilo in other thread. :) Uh, it was in this one, excuse me. Got both my and Manilo's mixed. -- Wojciech S. Czarnecki << ^oo^ >> OHIR-RIPE -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from

[go-nuts] golang and microsoft gp

2020-02-20 Thread will
Dear gophers, Does anyone have any resources on integrating a go application to a microsoft gp business app? The situtaion is where the golang app would provide data to microsoft gp regards, Will -- You received this message because you are subscribed to the Google Groups "golang-nuts" grou

[go-nuts] Re: array json streaming inside json object

2020-02-20 Thread Amnon Baron Cohen
Unfortunately there is not a more elegant way. Unless you change the protocol, and dispense with the idea of returning a single json object, and instead return line delimited streaming json. Then you can dispense with injecting brackets into your stream, and just call enc.Encode(doc) w.Writ

[go-nuts] [security] Vulnerability in golang.org/x/crypto/ssh

2020-02-20 Thread Filippo Valsorda
Hello gophers, Version v0.0.0-20200220183623-bac4c82f6975 of golang.org/x/crypto fixes a vulnerability in the golang.org/x/crypto/ssh package which allowed peers to cause a panic in SSH servers that accept public keys and in any SSH client. An attacker can craft an ssh-ed25519 or sk-ssh-ed25...@o

[go-nuts] Re: array json streaming inside json object

2020-02-20 Thread Brian Candler
There is even a "standard" for this: http://jsonlines.org/ -- 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

Re: [go-nuts] Re: [Proposal] Change how gofmt formats struct fields

2020-02-20 Thread Manlio Perillo
On Thursday, February 20, 2020 at 3:52:40 PM UTC+1, ohir wrote: > > Dnia 2020-02-20, o godz. 08:57:51 > David Riley > napisał(a): > > > I'm willing to be convinced otherwise. [...] > > a new "magic" tab that won't be supported > > This proposal is not about some "magic tab". It is about a gofm

Re: [go-nuts] Re: [Proposal] Change how gofmt formats struct fields

2020-02-20 Thread Robert Engels
I will re-iterate, this is something large distributed development teams have struggled with for a long-time - it's my experience that diffs that ignore formatting changes and provide "contextual changes" are far easier to use - especially for code reviews.If you are performing reviews using line b

[go-nuts] setting up a hardened https server in go 1.13

2020-02-20 Thread DrGo
https://blog.gopheracademy.com/advent-2016/exposing-go-on-the-internet/ I found this article very helpful in setting up a hardened https server. But It dates back to 2016 and go 1.8. Are there more up-to-date recommendations for go 1.13? Thanks, -- You received this message because you are

[go-nuts] Re: array json streaming inside json object

2020-02-20 Thread Jérôme LAFORGE
Thank you both. When I am the designer of API that must stream json array, I use JSONL. And it is much easier to use it as sender. Unfortunately, in this case, I can't modify the API. I read somewhere (I can't remember where), that somebody plans to work on simplicity for streaming json object

[go-nuts] Re: array json streaming inside json object

2020-02-20 Thread Amnon Baron Cohen
https://github.com/golang/go/issues/33714 is related. The problem you describe is far greater when decoding. On Friday, 21 February 2020 05:06:58 UTC, Jérôme LAFORGE wrote: > > Thank you both. > > When I am the designer of API that must stream json array, I use JSONL. > And it is much easier to