Hello,
Please take a look at the following demo, which is basically a copy of
the examples from archive/tar package documentation:
http://play.golang.org/p/npEgUjWE8I
If you uncomment ModTime field on line 23, the error goes away. As far
as I can tell, tar.Reader does not properly decode binary numeric
fields. If you write a Header without setting ModTime, the encoded
value is written using the binary format instead of octal. The Reader
only tries to decode octal values, so reading that record results in
ErrHeader error.
It seems strange to me that the Writer supports binary output, while
the Reader does not. Is there a reason for this? I would at least
update the package examples, because they do not seem to work in the
current form.
- Max