mirror of
https://github.com/datarhei/core.git
synced 2025-10-07 08:51:04 +08:00
Update dependencies
This commit is contained in:
3
vendor/github.com/go-openapi/swag/yaml.go
generated
vendored
3
vendor/github.com/go-openapi/swag/yaml.go
generated
vendored
@@ -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
|
||||
}
|
||||
|
Reference in New Issue
Block a user