Open sivchari opened 1 week ago
Perhaps AllHeaders
would be a better name.
Also I think error handling for this sort of iterator is currently an open issue. We may want to wait a bit to see if we come to a consensus on iterators where each value can fail.
I think that the question of adding iterators to existing packages is an example of what I was talking about in https://github.com/golang/go/issues/67510
Proposal Details
In Go 1.23, we can use range-over-func a.k.a iterator and developers propose to apply for the package into some packages.
For instance, the following issues are easy to know what kind of content are proposed. https://github.com/golang/go/issues/61897 https://github.com/golang/go/issues/64341
This proposal is similar with above it. I think it's good to apply for archive/tar, too.
Thanks.