This commit is contained in:
David Muthy 2025-03-03 08:23:35 +01:00 committed by GitHub
commit a48a63e2c1
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -3,6 +3,7 @@ package yqlib
import (
"fmt"
"path/filepath"
"slices"
"strings"
)
@ -95,12 +96,7 @@ func (f *Format) MatchesName(name string) bool {
if f.FormalName == name {
return true
}
for _, n := range f.Names {
if n == name {
return true
}
}
return false
return slices.Contains(f.Names, name)
}
func (f *Format) GetConfiguredEncoder() Encoder {