proposed and declined: https://golang.org/issue/27450
On Wednesday, August 11, 2021 at 11:53:54 AM UTC+2 Ralph Seichter wrote:
> * burak serdar:
>
> > f, err:=os.Open(file); if err!=nil { return err }
>
> I see no advantage in this kind of formatting. Having separate
> statements on separate line
* burak serdar:
> f, err:=os.Open(file); if err!=nil { return err }
I see no advantage in this kind of formatting. Having separate
statements on separate lines (instead of chained with ';') makes
code easier to read, IMO.
-Ralph
--
You received this message because you are subscribed to the Go
Here is an idea to make reading code a bit easier: If gofmt can format this:
f, err:=os.Open(file)
if err!=nil {
return err
}
as:
f, err:=os.Open(file); if err!=nil { return err }
it would make reading code easier by pushing the error passing code to the
right. This formatting would only be