I personally favour a variant of (3), without necessarily requiring that
every param get its own line: ie
func (c *CustomCaller) MethodCaller(
rootName string, version int, methodName string,
) (
rpcreflect.MethodCaller, error,
) {
...
}
...so that there's clear visual distinction between
Personally, I find #3 to be very hard to read. It's very difficult for me
to look at the signature and find the return values, and it's hard for me
to determine where code starts.
My preference is for #1 - let it wrap, and just try to use short names and
few arguments so as to avoid it most of
I was twiddling with gofmt, and I stumbled on this format, which is a lot
more readable for me, if we want to wrap long lines:
func (c *CustomCaller) MethodCaller(
rootName string,
version int,
methodName string,
) (rpcreflect.MethodCaller, error) {
}
On Tue, May 13, 2014 at 12:03 PM, Nate
I'm in general agreement with Dave. I don't think it really matters too
much as long as gofmt keeps it sane.
As we have already found, everyone will have differing opinions about
this, and I'm not going to share mine here.
While I understand the desire to get consensus on this topic, we have a