From 3a4079f97adc1435bc2ab0001794f778c14860b2 Mon Sep 17 00:00:00 2001 From: Adrien Delorme Date: Fri, 4 Oct 2019 11:31:33 +0200 Subject: [PATCH] yandex: use clean_resource_name too --- builder/yandex/template_func.go | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/builder/yandex/template_func.go b/builder/yandex/template_func.go index 91f83a9d5..144ed14e3 100644 --- a/builder/yandex/template_func.go +++ b/builder/yandex/template_func.go @@ -1,7 +1,9 @@ package yandex -import "strings" -import "text/template" +import ( + "strings" + "text/template" +) func isalphanumeric(b byte) bool { if '0' <= b && b <= '9' { @@ -13,9 +15,9 @@ func isalphanumeric(b byte) bool { return false } -// Clean up image name by replacing invalid characters with "-" +// Clean up resource name by replacing invalid characters with "-" // and converting upper cases to lower cases -func templateCleanImageName(s string) string { +func templateCleanResourceName(s string) string { if reImageFamily.MatchString(s) { return s } @@ -32,5 +34,5 @@ func templateCleanImageName(s string) string { } var TemplateFuncs = template.FuncMap{ - "clean_image_name": templateCleanImageName, + "clean_resource_name": templateCleanResourceName, }