-
-
Notifications
You must be signed in to change notification settings - Fork 125
Open
Description
// code before formating
func main() {
for i := 0; i < 5; i++ {
err := doSomething()
if err != nil {
fmt.Println(err)
}
doAnotherThingVoid()
}
}would become
// code after formating
func main() {
for i := 0; i < 5; i++ {
err := doSomething()
if err != nil {
fmt.Println(err)
}
doAnotherThingVoid()
}
}my proposal is to remove same empty lines in if and for statement as well
// my proposal
func main() {
for i := 0; i < 5; i++ {
err := doSomething()
if err != nil {
fmt.Println(err)
}
doAnotherThingVoid()
}
}note that the empty lines between different instructions in same level doesn't get removed. Same way as empty lines between function declarations.
this behavior is more consistent and better to read.
LuigiAzevedo, crazydadz, arnevm123, flimzy, Limero and 4 moremlaflamm and pavelnikolov
Metadata
Metadata
Assignees
Labels
No labels