Re: [go-nuts] The Go code formatter

2018-04-18 Thread Jérôme LAFORGE
I have already confronted to this problem with table driven test. -- 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

Re: [go-nuts] The Go code formatter

2018-04-18 Thread Ali Altun
A lof of similar situation, this kind of formating approach is needed. For example, the unformatted (or more precisely the manual formatted part) is mode readable for me. It may not be objective. // Before Go gofmt'ed aTempl := []map[string]interface{}{ > {"fname": "id", "

Re: [go-nuts] The Go code formatter

2018-04-18 Thread Ali Altun
aTempl := []map[string]interface{}{ {"fname": "id", "label": "Id", "boyut4": "01"}, {"fname": "exp", "label": "Exp", "boyut4": "02"}, {"fname": "atarih", "label": "Atarih", "boyut4": "05"}, {"fname": "kimlk", "label": "Kimlik", "boyut4": "03"}, {"fname":

Re: [go-nuts] The Go code formatter

2018-04-18 Thread Jan Mercl
On Wed, Apr 18, 2018 at 1:24 PM Ali Altun wrote: > There is a code part in the https://golang.org/pkg/sort/#example_ > The Go code formatter doesn't change this code. The code is already gofmt'ed, so no change is expected. > Similarly, how can I make it leave the following code snippet unchange

[go-nuts] The Go code formatter

2018-04-18 Thread Ali Altun
There is a code part in the https://golang.org/pkg/sort/#example_ The Go code formatter doesn't change this code. func (a ByAge) Len() int { return len(a) } > func (a ByAge) Swap(i, j int) { a[i], a[j] = a[j], a[i] } > func (a ByAge) Less(i, j int) bool { return a[i].Age < a[j].Age } > Similarl