98caf09f0f
Previously, ioutils imported the crypty/sha256 package, because it was used by the HashData() utility. As a side-effect of that import, the sha256 algorithm was registered through its `init()` function. Now that the HashData() utility is removed, the import is no longer needed in this package, but some parts of our code depended on the side-effect, and without this, it fail to recognise the algorithms, unless something else happens to import crypto/sha256 / crypto/sha512, which made our tests fail: ``` === Failed === FAIL: reference TestLoad (0.00s) store_test.go:53: failed to parse reference: unsupported digest algorithm === FAIL: reference TestSave (0.00s) store_test.go:82: failed to parse reference: unsupported digest algorithm === FAIL: reference TestAddDeleteGet (0.00s) store_test.go:174: could not parse reference: unsupported digest algorithm === FAIL: reference TestInvalidTags (0.00s) store_test.go:355: assertion failed: error is not nil: unsupported digest algorithm ``` While it would be better to do the import in the actual locations where it's expected, there may be code-paths we overlook, so instead adding the import here temporarily. Until the PR in go-digest has been merged and released. Signed-off-by: Sebastiaan van Stijn <github@gone.nl> |
||
---|---|---|
.. | ||
aaparser | ||
archive | ||
authorization | ||
broadcaster | ||
capabilities | ||
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 | ||
stack | ||
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!