mirror of
https://github.com/containers/podman.git
synced 2025-05-28 13:40:33 +08:00
update c/{buildah,common,image,storage} to latest main
Signed-off-by: Paul Holzinger <pholzing@redhat.com>
This commit is contained in:
9
vendor/github.com/go-openapi/loads/loaders.go
generated
vendored
9
vendor/github.com/go-openapi/loads/loaders.go
generated
vendored
@ -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{
|
||||
|
Reference in New Issue
Block a user