• Joe Tsai's avatar
    archive/tar: implement specialized logic for USTAR format · 0d1a8f6e
    Joe Tsai authored
    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: 's avatarIan Lance Taylor <iant@golang.org>
    0d1a8f6e
format.go 7.34 KB