Skip to content

Commit

Permalink
chore: api comment
Browse files Browse the repository at this point in the history
  • Loading branch information
AsterDY committed Jul 19, 2024
1 parent 643f9e4 commit 9947074
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions api.go
Original file line number Diff line number Diff line change
Expand Up @@ -207,6 +207,8 @@ func Get(src []byte, path ...interface{}) (ast.Node, error) {
return GetCopyFromString(rt.Mem2Str(src), path...)
}

//GetWithOptions searches and locates the given path from src json,
// with specific options of ast.Searcher
func GetWithOptions(src []byte, opts ast.SearchOptions, path ...interface{}) (ast.Node, error) {
s := ast.NewSearcher(rt.Mem2Str(src))
s.SearchOptions = opts
Expand Down

0 comments on commit 9947074

Please sign in to comment.