-
-
Notifications
You must be signed in to change notification settings - Fork 120
Labels
enhancementNew feature or requestNew feature or requestgood first issueGood for newcomersGood for newcomers
Description
That is, turn
func VeryLong(param1 T1, param2 T2, [...],
param6 T6, param7 T7) {
doWork(...)
}
into the more readable:
func VeryLong(param1 T1, param2 T2, [...],
param6 T6, param7 T7,
) {
doWork(...)
}
This is important to properly separate the parameter list from the function body, since in the first case they share the same indentation level.
I've seen an empty line be used for this too, as seen below, but it takes the same amount of lines and it's less clear and consistent:
func VeryLong(param1 T1, param2 T2, [...],
param6 T6, param7 T7) {
doWork(...)
}
This rule could be made stronger in the future, such as enforcing parameters to all be on separate lines, but I don't want to go that far right now. I assume most Go developers would not have an issue with this smaller change.
cc @twpayne @rogpeppe @kovetskiy @Southclaws @geoah for input
geoah, matrixik, twpayne, tjanez, flimzy and 2 moregeoahgeoah and arxeiss
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or requestgood first issueGood for newcomersGood for newcomers