146 matches across 1 files for func main path:src/cmd/go/internal/modload/query.go
snippet_mode: auto · sorted by relevance
src/cmd/go/internal/modload/query.go GO 146 matches · showing 5 view file →
69// from newer pre-release or development versions.
70//
71// The allowed function (which may be nil) is used to filter out unsuitable
72// versions (see AllowedFunc documentation for details). If the query refers to
73// a specific revision (for example, "master"; see IsRevisionQuery), and the
· · ·
72// versions (see AllowedFunc documentation for details). If the query refers to
73// a specific revision (for example, "master"; see IsRevisionQuery), and the
74// revision is disallowed by allowed, Query returns the error. If the query
· · ·
76// acts as if versions disallowed by allowed do not exist.
77//
78// If path is the path of the main module and the query is "latest",
79// Query returns Target.Version as the version.
80//
· · ·
81// Query often returns a non-nil *RevInfo with a non-nil error,
82// to provide an info.Origin that can allow the error to be cached.
83func Query(ld *Loader, ctx context.Context, path, query, current string, allowed AllowedFunc) (*modfetch.RevInfo, error) {
84 ctx, span := trace.StartSpan(ctx, "modload.Query "+path)
85 defer span.Done()
· · ·
90// queryReuse is like Query but also takes a map of module info that can be reused
91// if the validation criteria in Origin are met.
92func queryReuse(ld *Loader, ctx context.Context, path, query, current string, allowed AllowedFunc, reuse map[module.Version]*modinfo.ModulePublic) (*modfetch.RevInfo, error) {
93 var info *modfetch.RevInfo
94 err := modfetch.TryProxies(func(proxy string) (err error) {
+ 141 more matches in this file
Search syntax
auth loginboth terms (AND is implicit)
auth OR logineither term
NOT path:vendorexclude matches
"exact phrase"quoted exact match
/func\s+Test/regex
handler~1fuzzy (Levenshtein 1)
file:*_test.gofilename glob
path:pkg/auth/**full path glob
lang:golanguage filter

Search any public repo from your terminal

This page calls POST /api/v1/code_search. Same tool, available over MCP for Claude/Cursor/Copilot.