update c/{buildah,common,image,storage} to latest main

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
This commit is contained in:
Paul Holzinger
2024-05-08 13:51:48 +02:00
parent ee8ed8dd1f
commit d4c7ca39fd
318 changed files with 25238 additions and 21994 deletions

View File

@ -21,7 +21,7 @@ var (
func init() {
jsonLoader := &loader{
DocLoaderWithMatch: DocLoaderWithMatch{
Match: func(pth string) bool {
Match: func(_ string) bool {
return true
},
Fn: JSONDoc,
@ -86,7 +86,7 @@ func (l *loader) Load(path string) (json.RawMessage, error) {
return nil, erp
}
var lastErr error = errors.New("no loader matched") // default error if no match was found
lastErr := errors.New("no loader matched") // default error if no match was found
for ldr := l; ldr != nil; ldr = ldr.Next {
if ldr.Match != nil && !ldr.Match(path) {
continue
@ -118,9 +118,8 @@ func JSONDoc(path string) (json.RawMessage, error) {
// This sets the configuration at the package level.
//
// NOTE:
// * this updates the default loader used by github.com/go-openapi/spec
// * since this sets package level globals, you shouln't call this concurrently
//
// - this updates the default loader used by github.com/go-openapi/spec
// - since this sets package level globals, you shouln't call this concurrently
func AddLoader(predicate DocMatcher, load DocLoader) {
loaders = loaders.WithHead(&loader{
DocLoaderWithMatch: DocLoaderWithMatch{