From 3b5e1dddcd6d573431b95bbd611b515a178afaf2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?M=C3=B3zes=20L=C3=A1szl=C3=B3=20M=C3=A1t=C3=A9?= Date: Mon, 9 Dec 2024 13:28:04 +0100 Subject: [PATCH] fix doc string --- internal/kpt/fnruntime/container.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/internal/kpt/fnruntime/container.go b/internal/kpt/fnruntime/container.go index ef35ec98..75aa24d6 100644 --- a/internal/kpt/fnruntime/container.go +++ b/internal/kpt/fnruntime/container.go @@ -224,9 +224,9 @@ func NewContainerEnvFromStringSlice(envStr []string) *runtimeutil.ContainerEnv { return ce } -// ResolveToImageForCLIFunc returns a func that converts the function short path to the full image url. -// `prefix` must end with a "/". -// If the function is Catalog function, it adds `prefix` .e.g. "set-namespace:v0.1" --> prefix + "set-namespace:v0.1" +// ResolveToImageForCLIFunc returns a func that converts the KRM function short path to the full image url. +// If the function is a catalog function, it prepends `prefix`, e.g. "set-namespace:v0.1" --> prefix + "set-namespace:v0.1". +// A "/" is appended to `prefix` if it is not an empty string and does not end with a "/". func ResolveToImageForCLIFunc(prefix string) func(_ context.Context, image string) (string, error) { prefix = strings.TrimSuffix(prefix, "/") if prefix == "" {