05cbe23db9
Since go-1.11beta1 archive/tar, tar headers with Typeflag == TypeRegA (numeric 0) (which is the default unless explicitly initialized) are modified to have Typeflag set to either tar.TypeReg (character value '0', not numeric 0) or tar.TypeDir (character value '5') [1]. This results in different Typeflag value in the resulting header, leading to a different Checksum, and causing the following test case errors: > 12:09:14 --- FAIL: TestTarSums (0.05s) > 12:09:14 tarsum_test.go:393: expecting > [tarsum+sha256:8bf12d7e67c51ee2e8306cba569398b1b9f419969521a12ffb9d8875e8836738], > but got > [tarsum+sha256:75258b2c5dcd9adfe24ce71eeca5fc5019c7e669912f15703ede92b1a60cb11f] > ... (etc.) All the other code explicitly sets the Typeflag field, but this test case is not, causing the incompatibility with Go 1.11. Therefore, the fix is to set TypeReg explicitly, and change the expected checksums in test cases). Alternatively, we can vendor archive/tar again (for the 100th time), but given that the issue is limited to the particular test case it does not make sense. This fixes the test for all Go versions. [1] https://go-review.googlesource.com/c/go/+/85656 Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com> |
||
---|---|---|
.. | ||
aaparser | ||
archive | ||
authorization | ||
broadcaster | ||
chrootarchive | ||
containerfs | ||
devicemapper | ||
directory | ||
discovery | ||
dmesg | ||
filenotify | ||
fileutils | ||
fsutils | ||
homedir | ||
idtools | ||
ioutils | ||
jsonmessage | ||
locker | ||
longpath | ||
loopback | ||
mount | ||
namesgenerator | ||
parsers | ||
pidfile | ||
platform | ||
plugingetter | ||
plugins | ||
pools | ||
progress | ||
pubsub | ||
reexec | ||
signal | ||
stdcopy | ||
streamformatter | ||
stringid | ||
symlink | ||
sysinfo | ||
system | ||
tailfile | ||
tarsum | ||
term | ||
truncindex | ||
urlutil | ||
useragent | ||
README.md |
pkg/ is a collection of utility packages used by the Moby project without being specific to its internals.
Utility packages are kept separate from the moby core codebase to keep it as small and concise as possible. If some utilities grow larger and their APIs stabilize, they may be moved to their own repository under the Moby organization, to facilitate re-use by other projects. However that is not the priority.
The directory pkg
is named after the same directory in the camlistore project. Since Brad is a core
Go maintainer, we thought it made sense to copy his methods for organizing Go code :) Thanks Brad!
Because utility packages are small and neatly separated from the rest of the codebase, they are a good place to start for aspiring maintainers and contributors. Get in touch if you want to help maintain them!