archive/tar: implement specialized logic for USTAR format
Rather than going through the complicated logic of writeHeader, implement a writeUSTARHeader that only knows about the USTAR format. This makes the logic much easier to reason about since you only need to be concerned about USTAR and not all the subtle differences between USTAR, PAX, and GNU. We seperate out the logic in writeUSTARHeader into templateV7Plus and writeRawHeader since the planned implementations of writePAXHeader and writeGNUHeader will use them. Change-Id: Ie75a54ac998420ece82686159ae6fa39f8b128e9 Reviewed-on: https://go-review.googlesource.com/54970Reviewed-by: Ian Lance Taylor <iant@golang.org>
Showing
Please
register
or
sign in
to comment