From 1a41c23f5f6155d48ab32287914c128b45237892 Mon Sep 17 00:00:00 2001 From: Daniel Cooper Date: Tue, 25 Aug 2020 09:50:58 +0100 Subject: [PATCH] Format supported platform APIs using string join Signed-off-by: Daniel Cooper --- internal/commands/report.go | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/internal/commands/report.go b/internal/commands/report.go index 35ae678b2..c3cc76608 100644 --- a/internal/commands/report.go +++ b/internal/commands/report.go @@ -71,13 +71,7 @@ Config: configData = strings.TrimRight(padded.String(), " \n") } - platformAPIs := "" - for _, api := range build.SupportedPlatformAPIVersions { - if len(platformAPIs) > 0 { - platformAPIs += ", " - } - platformAPIs = fmt.Sprintf("%s%s", platformAPIs, api) - } + platformAPIs := strings.Join(build.SupportedPlatformAPIVersions.AsStrings(), ", ") return tpl.Execute(writer, map[string]string{ "Version": version,