Update dependencies

This commit is contained in:
Ingo Oppermann
2024-04-15 16:22:39 +02:00
parent 28d9ae78c7
commit e35c3dead3
209 changed files with 23214 additions and 17689 deletions

View File

@@ -16,6 +16,7 @@ package swag
import (
"encoding/json"
"errors"
"fmt"
"path/filepath"
"reflect"
@@ -50,7 +51,7 @@ func BytesToYAMLDoc(data []byte) (interface{}, error) {
return nil, err
}
if document.Kind != yaml.DocumentNode || len(document.Content) != 1 || document.Content[0].Kind != yaml.MappingNode {
return nil, fmt.Errorf("only YAML documents that are objects are supported")
return nil, errors.New("only YAML documents that are objects are supported")
}
return &document, nil
}