mirror of
https://github.com/superseriousbusiness/gotosocial
synced 2025-06-05 21:59:39 +02:00
[chore]: Bump github.com/gin-gonic/gin from 1.9.0 to 1.9.1 (#1855)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
This commit is contained in:
16
vendor/github.com/bytedance/sonic/ast/node.go
generated
vendored
16
vendor/github.com/bytedance/sonic/ast/node.go
generated
vendored
@ -1541,13 +1541,19 @@ var (
|
||||
emptyObjectNode = Node{t: types.V_OBJECT}
|
||||
)
|
||||
|
||||
// NewRaw creates a node of raw json, and decides its type by first char.
|
||||
// NewRaw creates a node of raw json.
|
||||
// If the input json is invalid, NewRaw returns a error Node.
|
||||
func NewRaw(json string) Node {
|
||||
if json == "" {
|
||||
panic("empty json string")
|
||||
parser := NewParser(json)
|
||||
start, err := parser.skip()
|
||||
if err != 0 {
|
||||
return *newError(err, err.Message())
|
||||
}
|
||||
it := switchRawType(json[0])
|
||||
return newRawNode(json, it)
|
||||
it := switchRawType(parser.s[start])
|
||||
if it == _V_NONE {
|
||||
return Node{}
|
||||
}
|
||||
return newRawNode(parser.s[start:parser.p], it)
|
||||
}
|
||||
|
||||
// NewAny creates a node of type V_ANY if any's type isn't Node or *Node,
|
||||
|
Reference in New Issue
Block a user