Closed perillo closed 4 years ago
Could you clarify why you think this is important? Is it for consistency with go list
, or to have deterministic behavior?
The order returned by packages
is deterministic. It is just not the order one may expect.
/cc @matloob
I'd prefer not to specify the ordering of GoFiles. We want it to be deterministic but I think that otherwise, the more flexibility the api has, the better.
It seems reasonable, and go help list
does not document that the files are sorted.
Thanks.
Okay, I'll close. Thanks!
The
GoFiles
field inpackages
is the concatenation ofGoFiles
andCgoFiles
fromgo list
.go list
returns the two fields sorted (although it seems to not be documented), butpackages
does not sort its ownGoFiles
.