-
Notifications
You must be signed in to change notification settings - Fork 72
Open
Description
Let's assume the following function exceeds the maximum line-length
func foo(name1 string, name2 string, name3 bool, name4 []byte) (*[]byte, error) {
return nil, nil
}
golines will then reformat it to
func boo(
name1 string,
name2 string,
name3 bool,
name4 []byte,
) (*[]byte, error) {
return nil, nil
}
This suggests to me there should be at most 2 function signature styles
- single line (if within max line length)
- multi-line with each param on a separate line (if exceeding max line length)
However, if we take something like this
func foo(
name1 string, name2 string, name3 bool, name4 []byte
) (*[]byte, error) {
return nil, nil
}
or this
func foo(name1 string, name2 string, name3 bool,
name4 []byte) (*[]byte, error) {
return nil, nil
}
golines will not format the function signature. Is this expected behaviour or should it actually format it using the multi-line params approach?
guettli
Metadata
Metadata
Assignees
Labels
No labels