vendor: update compose-go to v1.20.0

Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
This commit is contained in:
CrazyMax
2023-10-21 08:29:01 +02:00
parent be4fd7110d
commit 05a0fdf744
20 changed files with 605 additions and 303 deletions

View File

@ -98,7 +98,11 @@ func (p *parser) locateKeyName(src string) (string, string, bool, error) {
var key string
var inherited bool
// trim "export" and space at beginning
src = strings.TrimLeftFunc(exportRegex.ReplaceAllString(src, ""), isSpace)
if exportRegex.MatchString(src) {
// we use a `strings.trim` to preserve the pointer to the same underlying memory.
// a regexp replace would copy the string.
src = strings.TrimLeftFunc(strings.TrimPrefix(src, "export"), isSpace)
}
// locate key name end and validate it in single loop
offset := 0