replace TrimRight with TrimSuffix

This commit is contained in:
tanjunchen 2019-12-16 09:45:49 +08:00
parent 8df0d34c68
commit f45dba4b62
1 changed files with 1 additions and 1 deletions

View File

@ -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/<image-name>