From cdfab337dc77f5638adadda855abeb32e84bcfbc Mon Sep 17 00:00:00 2001 From: Billy Zha Date: Fri, 23 Dec 2022 17:00:57 +0800 Subject: [PATCH] fix test Signed-off-by: Billy Zha --- cmd/oras/internal/fileref/unix.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/cmd/oras/internal/fileref/unix.go b/cmd/oras/internal/fileref/unix.go index d13a80fbd..fac7f378c 100644 --- a/cmd/oras/internal/fileref/unix.go +++ b/cmd/oras/internal/fileref/unix.go @@ -23,7 +23,9 @@ import ( ) // Parse parses file reference on unix. -func Parse(reference string, mediaType string) (filePath, mediatype string, err error) { +func Parse(reference string, defaultMediaType string) (filePath, mediaType string, err error) { + filePath = reference + mediaType = defaultMediaType i := strings.LastIndex(reference, ":") if i >= 0 { filePath, mediatype = reference[:i], reference[i+1:]