6 ms·
You wouldn't use an alignment-based style, but a block-based one instead: some_function( arg1, arg2, arg3, arg4, arg5, ar
by steveklabnik 7y ago
You wouldn't use an alignment-based style, but a block-based one instead:
some_function(
arg1,
arg2,
arg3,
arg4,
arg5,
arg6,
);
(I don't know what Go idiom says here, this is just a more general solution.)
- masklinn 7y agoChecking the original code on the playground, Go just reindents everything using one tab per level. So if the funcall is indented by 2 (tabs), the line-broken arguments are indented by 3 (not aligned with the open paren). rustfmt looks to try and be "smarter" as it will move the argslist and add linebreaks to it go not go beyond whatever limit is configured on the playground, gofmt apparently doesn't insert breaks in arglists.