[chore]: Bump github.com/gin-contrib/cors from 1.4.0 to 1.5.0 (#2388)

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
This commit is contained in:
dependabot[bot] 2023-11-27 13:15:03 +00:00 committed by GitHub
commit 66b77acb1c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
169 changed files with 173005 additions and 56262 deletions

View file

@ -68,7 +68,11 @@ type Config struct {
// ValidateString indicates decoder and encoder to valid string values: decoder will return errors
// when unescaped control chars(\u0000-\u001f) in the string value of JSON.
ValidateString bool
ValidateString bool
// NoValidateJSONMarshaler indicates that the encoder should not validate the output string
// after encoding the JSONMarshaler to JSON.
NoValidateJSONMarshaler bool
}
var (
@ -87,6 +91,7 @@ var (
// ConfigFastest is the fastest config of APIs, aiming at speed.
ConfigFastest = Config{
NoQuoteTextMarshaler: true,
NoValidateJSONMarshaler: true,
}.Froze()
)
@ -183,4 +188,9 @@ func Get(src []byte, path ...interface{}) (ast.Node, error) {
// which can reduce unnecessary memory copy.
func GetFromString(src string, path ...interface{}) (ast.Node, error) {
return ast.NewSearcher(src).GetByPath(path...)
}
}
// Valid reports whether data is a valid JSON encoding.
func Valid(data []byte) bool {
return ConfigDefault.Valid(data)
}