mirror of
https://github.com/datarhei/core.git
synced 2025-10-08 17:30:52 +08:00
Update dependencies
This commit is contained in:
2
vendor/github.com/go-openapi/swag/initialism_index.go
generated
vendored
2
vendor/github.com/go-openapi/swag/initialism_index.go
generated
vendored
@@ -176,7 +176,7 @@ func (m *indexOfInitialisms) add(key string) *indexOfInitialisms {
|
||||
func (m *indexOfInitialisms) sorted() (result []string) {
|
||||
m.sortMutex.Lock()
|
||||
defer m.sortMutex.Unlock()
|
||||
m.index.Range(func(key, value interface{}) bool {
|
||||
m.index.Range(func(key, _ interface{}) bool {
|
||||
k := key.(string)
|
||||
result = append(result, k)
|
||||
return true
|
||||
|
14
vendor/github.com/go-openapi/swag/string_bytes.go
generated
vendored
14
vendor/github.com/go-openapi/swag/string_bytes.go
generated
vendored
@@ -2,21 +2,7 @@ package swag
|
||||
|
||||
import "unsafe"
|
||||
|
||||
type internalString struct {
|
||||
Data unsafe.Pointer
|
||||
Len int
|
||||
}
|
||||
|
||||
// hackStringBytes returns the (unsafe) underlying bytes slice of a string.
|
||||
func hackStringBytes(str string) []byte {
|
||||
p := (*internalString)(unsafe.Pointer(&str)).Data
|
||||
return unsafe.Slice((*byte)(p), len(str))
|
||||
}
|
||||
|
||||
/*
|
||||
* go1.20 version (for when go mod moves to a go1.20 requirement):
|
||||
|
||||
func hackStringBytes(str string) []byte {
|
||||
return unsafe.Slice(unsafe.StringData(str), len(str))
|
||||
}
|
||||
*/
|
||||
|
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