From 88545507e8c7d96d4f07a1cd4c323c11ae122e82 Mon Sep 17 00:00:00 2001 From: Sebastiaan van Stijn Date: Fri, 8 May 2026 00:32:29 +0200 Subject: [PATCH] pkg/compose: go fix Signed-off-by: Sebastiaan van Stijn --- pkg/compose/plugins.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/compose/plugins.go b/pkg/compose/plugins.go index a0eee8a37..90dfd202a 100644 --- a/pkg/compose/plugins.go +++ b/pkg/compose/plugins.go @@ -285,8 +285,8 @@ func (c CommandMetadata) CheckRequiredParameters(provider types.ServiceProviderC // firstLine returns the first line of s, stripping any trailing newlines. func firstLine(s string) string { s = strings.TrimRight(s, "\n") - if i := strings.IndexByte(s, '\n'); i >= 0 { - return s[:i] + if before, _, ok := strings.Cut(s, "\n"); ok { + return before } return s }