Skip to content

go/printer: odd layout of multiple return values that span lines #1207

@dsymonds

Description

@dsymonds
The last line of the first function looks odd, and the second function
looks even more odd. I'd prefer to have the values snuggled, but I
don't know if it would be an easy fix to gofmt.

-----
package foo

import "os"

type T struct {
       X, Y int
}

func F() (*T, os.Error) {
       return &T{
               X: 1,
               Y: 2,
       },
               nil
}

func G() (*T, *T, os.Error) {
       return &T{
               X: 1,
               Y: 2,
       },
               &T{
                       X: 3,
                       Y: 4,
               },
               nil
}
-----

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions