mirror of https://github.com/docker/docs.git
commit
36f6b7331e
|
@ -16,8 +16,7 @@ var MimeTypes = struct {
|
||||||
// http.DetectContentType is guaranteed not be nil, defaulting to
|
// http.DetectContentType is guaranteed not be nil, defaulting to
|
||||||
// application/octet-stream when a better guess cannot be made. The
|
// application/octet-stream when a better guess cannot be made. The
|
||||||
// result of this detection is then run through mime.ParseMediaType()
|
// result of this detection is then run through mime.ParseMediaType()
|
||||||
// which separates it from any parameters.
|
// which separates the actual MIME string from any parameters.
|
||||||
// Note that calling this function does not advance the Reader at r
|
|
||||||
func DetectContentType(c []byte) (string, map[string]string, error) {
|
func DetectContentType(c []byte) (string, map[string]string, error) {
|
||||||
|
|
||||||
ct := http.DetectContentType(c)
|
ct := http.DetectContentType(c)
|
||||||
|
|
Loading…
Reference in New Issue