Files
docker-cli/components/engine/pkg
Kir Kolyshkin 03d850d672 idtools.MkdirAs*: error out if dir exists as file
Standard golang's `os.MkdirAll()` function returns "not a directory" error
in case a directory to be created already exists but is not a directory
(e.g. a file). Our own `idtools.MkdirAs*()` functions do not replicate
the behavior.

This is a bug since all `Mkdir()`-like functions are expected to ensure
the required directory exists and is indeed a directory, and return an
error otherwise.

As the code is using our in-house `system.Stat()` call returning a type
which is incompatible with that of golang's `os.Stat()`, I had to amend
the `system` package with `IsDir()`.

A test case is also provided.

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
Upstream-commit: 2aa13f86f0c9cf3ed58a648a7b1506d4b06f3589
Component: engine
2017-11-27 13:25:44 -08:00
..
2017-10-24 15:39:34 -04:00
2017-09-12 12:09:59 -04:00
2017-07-31 13:16:46 -07:00
2017-10-24 15:39:34 -04:00
2017-08-18 14:23:44 -04:00
2017-10-02 11:20:21 -07:00
2017-09-12 12:09:59 -04:00
2017-09-08 18:23:21 -04:00
2017-09-12 12:09:59 -04:00
2017-07-03 13:13:09 -07:00
2017-08-21 18:15:08 -04:00
2017-05-08 17:02:02 -07:00
2016-11-13 20:08:51 -08:00
2017-09-08 18:23:21 -04:00
2017-06-26 10:07:04 -07:00
2017-10-25 13:56:12 +02:00

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!