mirror of https://github.com/docker/cli.git
90f256aeab
Adds capabilities to import a .zip file with importZip.
Detects the content type of source by checking bytes & DetectContentType.
Adds LimitedReader reader, a fork of io.LimitedReader,
was needed for better error messaging instead of just getting back EOF.
We are using limited reader to avoid very big files causing memory issues.
Adds a new file size limit for context imports,
this limit is used for the main file for .zip & .tar and individual compressed
files for .zip.
Added TestImportZip that will check the import content type
Then will assert no err on Importing .zip file
Signed-off-by: Goksu Toprak <goksu.toprak@docker.com>
(cherry picked from commit
|
||
---|---|---|
.. | ||
doc.go | ||
io_utils.go | ||
io_utils_test.go | ||
metadata_test.go | ||
metadatastore.go | ||
store.go | ||
store_test.go | ||
storeconfig.go | ||
storeconfig_test.go | ||
tlsstore.go | ||
tlsstore_test.go |