From f45dba4b62a45c64c1625d8b4105c9ad3811941f Mon Sep 17 00:00:00 2001 From: tanjunchen <2799194073@qq.com> Date: Mon, 16 Dec 2019 09:45:49 +0800 Subject: [PATCH] replace TrimRight with TrimSuffix --- pkg/assets/builder.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/assets/builder.go b/pkg/assets/builder.go index d04ebaeb5c..66ab2d45c9 100644 --- a/pkg/assets/builder.go +++ b/pkg/assets/builder.go @@ -160,7 +160,7 @@ func (a *AssetBuilder) RemapImage(image string) (string, error) { } if a.AssetsLocation != nil && a.AssetsLocation.ContainerProxy != nil { - containerProxy := strings.TrimRight(*a.AssetsLocation.ContainerProxy, "/") + containerProxy := strings.TrimSuffix(*a.AssetsLocation.ContainerProxy, "/") normalized := image // If the image name contains only a single / we need to determine if the image is located on docker-hub or if it's using a convenient URL like k8s.gcr.io/