Merge pull request #8041 from tanjunchen/fix-code

replace TrimRight with TrimSuffix
This commit is contained in:
Kubernetes Prow Robot 2019-12-27 22:39:38 -08:00 committed by GitHub
commit b6be94935e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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>