mirror of https://github.com/docker/cli.git
fixed string replace
Signed-off-by: Wayne Cheng <zhengwei@tiduyun.com>
This commit is contained in:
parent
c2919580b6
commit
46b474267b
|
@ -170,13 +170,13 @@ func manifestToFilename(root, manifestList, manifest string) string {
|
||||||
}
|
}
|
||||||
|
|
||||||
func makeFilesafeName(ref string) string {
|
func makeFilesafeName(ref string) string {
|
||||||
fileName := strings.ReplaceAll(ref, ":", "--")
|
fileName := strings.ReplaceAll(ref, ":", "%")
|
||||||
return strings.ReplaceAll(fileName, "/", "__")
|
return strings.ReplaceAll(fileName, "/", "#")
|
||||||
}
|
}
|
||||||
|
|
||||||
func filenameToRefString(filename string) string {
|
func filenameToRefString(filename string) string {
|
||||||
refString := strings.ReplaceAll(filename, "--", ":")
|
refString := strings.ReplaceAll(filename, "%", ":")
|
||||||
return strings.ReplaceAll(refString, "__", "/")
|
return strings.ReplaceAll(refString, "#", "/")
|
||||||
}
|
}
|
||||||
|
|
||||||
type notFoundError struct {
|
type notFoundError struct {
|
||||||
|
|
Loading…
Reference in New Issue