gopatch
gopatch copied to clipboard
Understand decl groupings
For gopatch, currently the following are different:
var foo = 42
var (
foo = 42
)
gopatch should understand decl groupings for types, consts, vars, and funcs so that these are treated as equivalent.
Ideally it should also understand which of those groupings are unordered so the following are considered equivalent by a patch.
type (
Foo struct{}
Bar struct{}
)
type (
Bar struct{}
Foo struct{}
)
Ideally it should also understand which of those groupings are unordered so the following are considered equivalent by a patch.
@abhinav, did you mean to say these are considered equivalent:
type (
Foo struct{}
Bar struct{}
)
type (
Bar struct{}
Foo struct{}
)
instead of:
type (
Foo struct{}
Bar struct{}
)
type (
Foo struct{}
Bar struct{}
)
Hey @sywhang. Yeah, I meant the first case, but what's different between the two versions in the second case?
The second struct has "Bar" before "Foo" whereas the example structs in the issue are completely identical structs 😁
Derp. My bad. Fixing.