Update image-tools, and remove the duplicate Sirupsen/logrus vendor

This commit is contained in:
Miloslav Trmač
2017-09-27 00:43:23 +02:00
parent 40a5f48632
commit 700199c944
290 changed files with 39444 additions and 13093 deletions

View File

@@ -29,6 +29,7 @@ import (
const (
TypeImageLayout = "imageLayout"
TypeImage = "image"
TypeImageZip = "imageZip"
TypeManifest = "manifest"
TypeImageIndex = "imageIndex"
TypeConfig = "config"
@@ -60,8 +61,10 @@ func Autodetect(path string) (string, error) {
mimeType := http.DetectContentType(buf)
switch mimeType {
case "application/x-gzip", "application/octet-stream":
case "application/x-gzip", "application/x-rar-compressed", "application/octet-stream":
return TypeImage, nil
case "application/zip":
return TypeImageZip, nil
case "text/plain; charset=utf-8":
// might be a JSON file, will be handled below