216 matches across 1 files for func main lang:Go path:src/cmd/go/internal/modload/init.go
snippet_mode: grep · sorted by relevance
src/cmd/go/internal/modload/init.go GO 216 matches · showing 5 view file →
3// license that can be found in the LICENSE file.
4
5// Package modload provides module and package loading functionality.
6package modload
7
· · ·
40// TODO(#40775): See if these can be plumbed as explicit parameters.
41var (
42 // ExplicitWriteGoMod prevents LoadPackages, ListModules, and other functions
43 // from updating go.mod and go.sum or reporting errors when updates are
44 // needed. A package should set this if it would cause go.mod to be written
· · ·
58// NewForModroot creates a new module loader in single-module mode for the module at
59// the given modroot..
60func NewForModroot(ctx context.Context, modroot string) *Loader {
61 ld := NewLoader()
62 ld.modRoots = []string{modroot}
· · ·
66
67// NewForWorkspace creates a new loader for workspace mode from the given module mode loader ld,
68// applying ld's updated requirements to the main module to the corresponding module in the workspace.
69func (ld *Loader) NewForWorkspace(ctx context.Context) (*Loader, error) {
70 // Find the identity of the main module that will be updated before we reset modload state.
· · ·
69func (ld *Loader) NewForWorkspace(ctx context.Context) (*Loader, error) {
70 // Find the identity of the main module that will be updated before we reset modload state.
71 mm := ld.MainModules.mustGetSingleMainModule(ld)
+ 211 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.