summaryrefslogtreecommitdiff
path: root/vendor/github.com/bytedance/sonic/api.go
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/github.com/bytedance/sonic/api.go')
-rw-r--r--vendor/github.com/bytedance/sonic/api.go5
1 files changed, 3 insertions, 2 deletions
diff --git a/vendor/github.com/bytedance/sonic/api.go b/vendor/github.com/bytedance/sonic/api.go
index a2bc67eaa..a042476f1 100644
--- a/vendor/github.com/bytedance/sonic/api.go
+++ b/vendor/github.com/bytedance/sonic/api.go
@@ -169,9 +169,10 @@ func UnmarshalString(buf string, val interface{}) error {
// and returns its representing ast.Node.
//
// Each path arg must be integer or string:
-// - Integer means searching current node as array
-// - String means searching current node as object
+// - Integer is target index(>=0), means searching current node as array.
+// - String is target key, means searching current node as object.
//
+//
// Note, the api expects the json is well-formed at least,
// otherwise it may return unexpected result.
func Get(src []byte, path ...interface{}) (ast.Node, error) {