Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
cmd/doc, go/parser: fix merging comments in -src mode
This commit fixes go doc -src mode that vomits comments from random files if filesystem does not sort files by name. The issue was with parse.ParseDir using the Readdir order of files, which varies between platforms and filesystem implementations. Another option is to merge comments using token.FileSet.Iterate order in cmd/doc, but since ParseDir is mostly used in go doc, I’ve opted for smaller change because it’s unlikely to break other uses or cause any perfomance issues. Example (macOS APFS): go doc -src net.ListenPacket
- Loading branch information