1
0
mirror of https://github.com/golang/go synced 2024-11-08 05:46:12 -07:00
go/src/archive/tar
Joe Tsai 0d1a8f6e12 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/54970
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2017-08-12 01:48:06 +00:00
..
testdata archive/tar: forbid NUL character in string fields 2017-08-11 03:12:47 +00:00
common.go archive/tar: check for permissible output formats first 2017-08-11 04:39:39 +00:00
example_test.go archive/tar: spell license correctly in example 2015-12-17 02:46:41 +00:00
format.go archive/tar: implement specialized logic for USTAR format 2017-08-12 01:48:06 +00:00
reader_test.go archive/tar: forbid NUL character in string fields 2017-08-11 03:12:47 +00:00
reader.go archive/tar: fallback to pre-Go1.8 behavior on certain GNU files 2017-08-11 03:11:49 +00:00
stat_atim.go
stat_atimespec.go
stat_unix.go archive/tar: don't treat multiple file system links as a tar hardlink 2015-08-04 17:34:43 +00:00
strconv_test.go archive/tar: ensure input fits in octal field 2017-08-11 03:25:17 +00:00
strconv.go archive/tar: ensure input fits in octal field 2017-08-11 03:25:17 +00:00
tar_test.go archive/tar: check for permissible output formats first 2017-08-11 04:39:39 +00:00
writer_test.go archive/tar: forbid NUL character in string fields 2017-08-11 03:12:47 +00:00
writer.go archive/tar: implement specialized logic for USTAR format 2017-08-12 01:48:06 +00:00