x/tools/cover: allow reading from an io.Reader #19404
Labels
FrozenDueToAge
Proposal-Accepted
Tools
This label describes issues relating to any tools in the x/tools repository.
Milestone
The only interface available now is ParseProfiles which accepts a filename to read from. In cases where that data has already been read or is coming from somewhere other than a filesystem, it'd be nice to be able to parse it in-place rather than having to reread a file (or in the worst case write a file first).
Our use case is that we have a build tool that handles coverage across multiple languages, and so we read the data in and perform some simple heuristics to figure out how to parse it. That works fine for common JSON or XML formats, it'd be nice not to incur this inefficient re-read for Go.
I'm happy to send a pull request implementing this.
Compatibility
It will be easy to implement this while preserving the old interface as well.
The text was updated successfully, but these errors were encountered: