84,685 matches across 25 files for func main
snippet_mode: auto · sorted by relevance
src/testing/testing.go GO 289 matches · showing 5 view file →
5// Package testing provides support for automated testing of Go packages.
6// It is intended to be used in concert with the "go test" command, which automates
7// execution of any function of the form
8//
9// func TestXxx(*testing.T)
· · ·
9// func TestXxx(*testing.T)
10//
11// where Xxx does not start with a lowercase letter. The function name
· · ·
11// where Xxx does not start with a lowercase letter. The function name
12// serves to identify the test routine.
13//
· · ·
14// Within these functions, use [T.Error], [T.Fail] or related methods to signal failure.
15//
16// To write a new test suite, create a file that
· · ·
17// contains the TestXxx functions as described here,
18// and give that file a name ending in "_test.go".
19// The file will be excluded from regular
+ 284 more matches in this file
src/runtime/proc.go GO 395 matches · showing 5 view file →
26// The scheduler's job is to distribute ready-to-run goroutines over worker threads.
27//
28// The main concepts are:
29// G - goroutine.
30// M - worker thread, or machine.
· · ·
84// utilization.
85//
86// The main implementation complication is that we need to be very careful
87// during spinning->non-spinning thread transition. This transition can race
88// with submission of new work, and either one part or another needs to unpark
· · ·
129var runtime_inittasks []*initTask
130
131// mainInitDone is a signal used by cgocallbackg that initialization
132// has been completed. If this is false, wait on mainInitDoneChan.
133var mainInitDone atomic.Bool
· · ·
132// has been completed. If this is false, wait on mainInitDoneChan.
133var mainInitDone atomic.Bool
134
· · ·
133var mainInitDone atomic.Bool
134
135// mainInitDoneChan is closed after initialization has been completed.
+ 390 more matches in this file
src/cmd/go/internal/modload/init.go GO 220 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
· · ·
56)
57
58// EnterModule resets MainModules and requirements to refer to just this one module.
59func EnterModule(ld *Loader, ctx context.Context, enterModroot string) {
60 ld.MainModules = nil // reset MainModules
· · ·
59func EnterModule(ld *Loader, ctx context.Context, enterModroot string) {
60 ld.MainModules = nil // reset MainModules
61 ld.requirements = nil
· · ·
60 ld.MainModules = nil // reset MainModules
61 ld.requirements = nil
62 ld.workFilePath = "" // Force module mode
+ 215 more matches in this file
src/cmd/compile/internal/ssa/prove.go GO 171 matches · showing 5 view file →
28)
29
30func (b branch) String() string {
31 switch b {
32 case unknown:
· · ·
74}
75
76func (r relation) String() string {
77 if r < relation(len(relationStrings)) {
78 return relationStrings[r]
· · ·
81}
82
83// domain represents the domain of a variable pair in which a set
84// of relations is known. For example, relations learned for unsigned
85// pairs cannot be transferred to signed pairs because the same bit
· · ·
86// representation can mean something else.
87type domain uint
88
89const (
· · ·
90 signed domain = 1 << iota
91 unsigned
92 pointer
+ 166 more matches in this file
src/runtime/panic.go GO 187 matches · showing 5 view file →
38// We have two different ways of doing defers. The older way involves creating a
39// defer record at the time that a defer statement is executing and adding it to a
40// defer chain. This chain is inspected by the deferreturn call at all function
41// exits in order to run the appropriate defer calls. A cheaper way (which we call
42// open-coded defers) is used for functions in which no defer statements occur in
· · ·
42// open-coded defers) is used for functions in which no defer statements occur in
43// loops. In that case, we simply store the defer function/arg information into
44// specific stack slots at the point of each defer statement, as well as setting a
· · ·
43// loops. In that case, we simply store the defer function/arg information into
44// specific stack slots at the point of each defer statement, as well as setting a
45// bit in a bitmask. At each function exit, we add inline code to directly make
· · ·
45// bit in a bitmask. At each function exit, we add inline code to directly make
46// the appropriate defer calls based on the bitmask and fn/arg information stored
47// on the stack. During panic/Goexit processing, the appropriate defer calls are
· · ·
48// made using extra funcdata info that indicates the exact stack slots that
49// contain the bitmask and defer fn/args.
50
+ 182 more matches in this file
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
src/cmd/go/internal/modload/load.go GO 141 matches · showing 5 view file →
6
7// This file contains the module-mode package loader, as well as some accessory
8// functions pertaining to the package import graph.
9//
10// There are two exported entry points into package loading — LoadPackages and
· · ·
12// manipulates an instance of the loader struct.
13//
14// Although most of the loading state is maintained in the loader struct,
15// one key piece - the build list - is a global, so that it can be modified
16// separate from the loading operation, such as during "go get"
· · ·
28// computed from the package import graph, and therefore cannot be an initial
29// input to loading that graph. Instead, the root packages for the "all" pattern
30// are those contained in the main module, and allPatternIsRoot parameter to the
31// loader instructs it to dynamically expand those roots to the full "all"
32// pattern as loading progresses.
· · ·
35// package is known to match the "all" meta-pattern.
36// A package matches the "all" pattern if:
37// - it is in the main module, or
38// - it is imported by any test in the main module, or
39// - it is imported by a tool of the main module, or
· · ·
38// - it is imported by any test in the main module, or
39// - it is imported by a tool of the main module, or
40// - it is imported by another package in "all", or
+ 136 more matches in this file
src/cmd/go/internal/load/pkg.go GO 226 matches · showing 5 view file →
85 Incomplete bool `json:",omitempty"` // was there an error loading this package or dependencies?
86
87 DefaultGODEBUG string `json:",omitempty"` // default GODEBUG setting (only for Name=="main")
88
89 // Stale and StaleReason remain here *only* for the list command.
· · ·
89 // Stale and StaleReason remain here *only* for the list command.
90 // They are only initialized in preparation for list execution.
91 // The regular build determines staleness on the fly during action execution.
· · ·
152// The go/build package filtered others out (like foo_wrongGOARCH.s)
153// and that's OK.
154func (p *Package) AllFiles() []string {
155 files := str.StringList(
156 p.GoFiles,
· · ·
196
197// Desc returns the package "description", for use in b.showOutput.
198func (p *Package) Desc() string {
199 if p.ForTest != "" {
200 return p.ImportPath + " [" + p.ForTest + ".test]"
· · ·
201 }
202 if p.Internal.ForMain != "" {
203 return p.ImportPath + " [" + p.Internal.ForMain + "]"
204 }
+ 221 more matches in this file
src/cmd/go/internal/modget/get.go GO 140 matches · showing 5 view file →
136 Long: `
137The go command can run version control commands like git
138to download imported code. This functionality is critical to the decentralized
139Go package ecosystem, in which code can be imported from any server,
140but it is also a potential security problem, if a malicious server finds a
· · ·
141way to cause the invoked version control command to run unintended code.
142
143To balance the functionality and security concerns, the go command
144by default will only use git and hg to download code from public servers.
145But it will use any known version control system (fossil, git, hg, svn)
· · ·
227}
228
229func (*upgradeFlag) IsBoolFlag() bool { return true } // allow -u
230
231func (v *upgradeFlag) Set(s string) error {
· · ·
231func (v *upgradeFlag) Set(s string) error {
232 if s == "false" {
233 v.version = ""
· · ·
243}
244
245func (v *upgradeFlag) String() string { return "" }
246
247// dFlag is a custom flag.Value for the deprecated -d flag
+ 135 more matches in this file
src/net/http/internal/http2/transport.go GO 183 matches · showing 5 view file →
74// Hook points used for testing.
75// Outside of tests, t.transportTestHooks is nil and these all have minimal implementations.
76// Inside tests, see the testSyncHooks function docs.
77
78type transportTestHooks struct {
· · ·
79 newclientconn func(*ClientConn)
80}
81
· · ·
82func (t *Transport) maxHeaderListSize() uint32 {
83 n := t.t1.MaxHeaderListSize()
84 if b := t.t1.MaxResponseHeaderBytes(); b != 0 {
· · ·
97}
98
99func (t *Transport) disableCompression() bool {
100 return t.t1 != nil && t.t1.DisableCompression()
101}
· · ·
102
103func NewTransport(t1 TransportConfig) *Transport {
104 connPool := new(clientConnPool)
105 t2 := &Transport{
+ 178 more matches in this file
src/cmd/cover/cover.go GO 120 matches · showing 5 view file →
3// license that can be found in the LICENSE file.
4
5package main
6
7import (
· · ·
43 go tool cover -html=c.out -o coverage.html
44
45Display coverage percentages to stdout for each function:
46 go tool cover -func=c.out
47
· · ·
46 go tool cover -func=c.out
47
48Finally, to generate modified source code with coverage annotations
· · ·
59`
60
61func usage() {
62 fmt.Fprint(os.Stderr, usageMessage)
63 fmt.Fprintln(os.Stderr, "\nFlags:")
· · ·
64 flag.PrintDefaults()
65 fmt.Fprintln(os.Stderr, "\n Only one of -html, -func, or -mode may be set.")
66 os.Exit(2)
67}
+ 115 more matches in this file
src/cmd/gofmt/gofmt.go GO 37 matches · showing 5 view file →
3// license that can be found in the LICENSE file.
4
5package main
6
7import (
· · ·
32
33var (
34 // main operation modes
35 list = flag.Bool("l", false, "list files whose formatting differs from gofmt's")
36 write = flag.Bool("w", false, "write result to (source) file instead of stdout")
· · ·
70
71var (
72 rewrite func(*token.FileSet, *ast.File) *ast.File
73 parserMode parser.Mode
74)
· · ·
75
76func usage() {
77 fmt.Fprintf(os.Stderr, "usage: gofmt [flags] [path ...]\n")
78 flag.PrintDefaults()
· · ·
79}
80
81func initParserMode() {
82 parserMode = parser.ParseComments | parser.SkipObjectResolution
83 if *allErrors {
+ 32 more matches in this file
misc/ios/go_ios_exec.go GO 14 matches · showing 5 view file →
5// This program can be used as go_ios_$GOARCH_exec by the Go tool. It executes
6// binaries on the iOS Simulator using the XCode toolchain.
7package main
8
9import (
· · ·
36var lock *os.File
37
38func main() {
39 log.SetFlags(0)
40 log.SetPrefix("go_ios_exec: ")
· · ·
49 bundleID = "golang.gotest"
50
51 exitCode, err := runMain()
52 if err != nil {
53 log.Fatalf("%v\n", err)
· · ·
56}
57
58func runMain() (int, error) {
59 var err error
60 tmpdir, err = os.MkdirTemp("", "go_ios_exec_")
· · ·
95}
96
97func runOnSimulator(appdir string) error {
98 if err := installSimulator(appdir); err != nil {
99 return err
+ 9 more matches in this file
src/cmd/cgo/internal/testplugin/testdata/host/host.go GO 26 matches · showing 5 view file →
3// license that can be found in the LICENSE file.
4
5package main
6
7import (
· · ·
15)
16
17func init() {
18 common.X *= 5
19}
· · ·
21// testUnnamed tests that two plugins built with .go files passed on
22// the command line do not have overlapping symbols. That is,
23// unnamed1.so/FuncInt and unnamed2.so/FuncInt should be distinct functions.
24func testUnnamed() {
25 p, err := plugin.Open("unnamed1.so")
· · ·
24func testUnnamed() {
25 p, err := plugin.Open("unnamed1.so")
26 if err != nil {
· · ·
27 log.Fatalf(`plugin.Open("unnamed1.so"): %v`, err)
28 }
29 fn, err := p.Lookup("FuncInt")
30 if err != nil {
31 log.Fatalf(`unnamed1.so: Lookup("FuncInt") failed: %v`, err)
+ 21 more matches in this file
src/cmd/pprof/pprof.go GO 27 matches · showing 5 view file →
8// upstreaming any modifications to these packages.
9
10package main
11
12import (
· · ·
33)
34
35func main() {
36 counter.Open()
37 counter.Inc("pprof/invocations")
· · ·
52}
53
54func (f *fetcher) Fetch(src string, duration, timeout time.Duration) (*profile.Profile, string, error) {
55 // Firstly, determine if the src is an existing file on the disk.
56 // If it is a file, let regular pprof open it.
· · ·
76}
77
78func getProfile(source string, timeout time.Duration) (*profile.Profile, error) {
79 url, err := url.Parse(source)
80 if err != nil {
· · ·
109}
110
111func statusCodeError(resp *http.Response) error {
112 if resp.Header.Get("X-Go-Pprof") != "" && strings.Contains(resp.Header.Get("Content-Type"), "text/plain") {
113 // error is from pprof endpoint
+ 22 more matches in this file
src/cmd/compile/internal/loopvar/testdata/for_complicated_esc_address.go GO 5 matches view file →
3// license that can be found in the LICENSE file.
4
5package main
6
7import (
· · ·
10)
11
12func main() {
13 ss, sa := shared(23)
14 ps, pa := private(23)
· · ·
24}
25
26func experiment(x int) (int, int) {
27 sum := 0
28 var is []*int
· · ·
53}
54
55func private(x int) (int, int) {
56 sum := 0
57 var is []*int
· · ·
86}
87
88func shared(x int) (int, int) {
89 sum := 0
90 var is []*int
src/net/http/server.go GO 246 matches · showing 5 view file →
146 // If WriteHeader is not called explicitly, the first call to Write
147 // will trigger an implicit WriteHeader(http.StatusOK).
148 // Thus explicit calls to WriteHeader are mainly used to
149 // send error codes or 1xx informational responses.
150 //
· · ·
202 //
203 // After a call to Hijack, the original Request.Body must not
204 // be used. The original Request's Context remains valid and
205 // is not canceled until the Request's ServeHTTP method
206 // returns.
· · ·
259
260 // cancelCtx cancels the connection-level context.
261 cancelCtx context.CancelFunc
262
263 // rwc is the underlying network connection.
· · ·
283 // r is bufr's read source. It's a wrapper around rwc that provides
284 // io.LimitedReader-style limiting (while reading request headers)
285 // and functionality to support CloseNotifier. See *connReader docs.
286 r *connReader
287
· · ·
309}
310
311func (c *conn) hijacked() bool {
312 c.mu.Lock()
313 defer c.mu.Unlock()
+ 241 more matches in this file
src/cmd/go/internal/modload/buildlist.go GO 115 matches · showing 5 view file →
45 // rootModules is the set of root modules of the graph, sorted and capped to
46 // length. It may contain duplicates, and may contain multiple versions for a
47 // given module path. The root modules of the graph are the set of main
48 // modules in workspace mode, and the main module's direct requirements
49 // outside workspace mode.
· · ·
48 // modules in workspace mode, and the main module's direct requirements
49 // outside workspace mode.
50 //
· · ·
55
56 // direct is the set of module paths for which we believe the module provides
57 // a package directly imported by a package or test in the main module.
58 //
59 // The "direct" map controls which modules are annotated with "// indirect"
· · ·
69 //
70 // The direct map is keyed by module paths, not module versions. When a
71 // module's selected version changes, we assume that it remains direct if the
72 // previous version was a direct dependency. That assumption might not hold in
73 // rare cases (such as if a dependency splits out a nested module, or merges a
· · ·
86}
87
88func mustHaveGoRoot(roots []module.Version) {
89 for _, m := range roots {
90 if m.Path == "go" {
+ 110 more matches in this file
src/cmd/compile/internal/ir/mknode.go GO 22 matches · showing 5 view file →
8// go run mknode.go
9
10package main
11
12import (
· · ·
40// implementsNode reports whether the type t is one which represents a Node
41// in the AST.
42func implementsNode(t ast.Expr) bool {
43 id, ok := t.(*ast.Ident)
44 if !ok {
· · ·
58}
59
60func isMini(t ast.Expr) bool {
61 id, ok := t.(*ast.Ident)
62 return ok && mini[id.Name] != nil
· · ·
63}
64
65func isNamedType(t ast.Expr, name string) bool {
66 if id, ok := t.(*ast.Ident); ok {
67 if id.Name == name {
· · ·
72}
73
74func main() {
75 fmt.Fprintln(&buf, "// Code generated by mknode.go. DO NOT EDIT.")
76 fmt.Fprintln(&buf)
+ 17 more matches in this file
src/crypto/x509/parser.go GO 53 matches · showing 5 view file →
34// isPrintable reports whether the given b is in the ASN.1 PrintableString set.
35// This is a simplified version of encoding/asn1.isPrintable.
36func isPrintable(b byte) bool {
37 return 'a' <= b && b <= 'z' ||
38 'A' <= b && b <= 'Z' ||
· · ·
59// from the respective encoding/asn1.parse... methods, rather than just
60// increasing the API surface of that package.
61func parseASN1String(tag cryptobyte_asn1.Tag, value []byte) (string, error) {
62 switch tag {
63 case cryptobyte_asn1.T61String:
· · ·
64 // T.61 is a defunct ITU 8-bit character encoding which preceded Unicode.
65 // T.61 uses a code page layout that _almost_ exactly maps to the code
66 // page layout of the ISO 8859-1 (Latin-1) character encoding, with the
· · ·
90 return string(value), nil
91 case cryptobyte_asn1.Tag(asn1.TagBMPString):
92 // BMPString uses the defunct UCS-2 16-bit character encoding, which
93 // covers the Basic Multilingual Plane (BMP). UTF-16 was an extension of
94 // UCS-2, containing all of the same code points, but also including
· · ·
141
142// readASN1Any parses types documented at [pkix.AttributeTypeAndValue].
143func readASN1Any(der *cryptobyte.String) (any, error) {
144 var fullValue cryptobyte.String
145 var valueTag cryptobyte_asn1.Tag
+ 48 more matches in this file
src/cmd/pack/pack.go GO 17 matches · showing 5 view file →
3// license that can be found in the LICENSE file.
4
5package main
6
7import (
· · ·
25 go doc cmd/pack`
26
27func usage() {
28 fmt.Fprintln(os.Stderr, usageMessage)
29 os.Exit(2)
· · ·
30}
31
32func main() {
33 log.SetFlags(0)
34 log.SetPrefix("pack: ")
· · ·
82
83// setOp parses the operation string (first argument).
84func setOp(arg string) {
85 // Recognize 'go tool pack grc' because that was the
86 // formerly canonical way to build a new archive
· · ·
125
126// archive opens (and if necessary creates) the named archive.
127func openArchive(name string, mode int, files []string) *Archive {
128 f, err := os.OpenFile(name, mode, 0666)
129 if err != nil {
+ 12 more matches in this file
src/cmd/go/internal/modload/modfile.go GO 67 matches · showing 5 view file →
30// ReadModFile reads and parses the mod file at gomod. ReadModFile properly applies the
31// overlay, locks the file while reading, and applies fix, if applicable.
32func ReadModFile(gomod string, fix modfile.VersionFixer) (data []byte, f *modfile.File, err error) {
33 if fsys.Replaced(gomod) {
34 // Don't lock go.mod if it's part of the overlay.
· · ·
76}
77
78func shortPathErrorList(err error) error {
79 if el, ok := errors.AsType[modfile.ErrorList](err); ok {
80 for i := range el {
· · ·
114)
115
116func (p modPruning) String() string {
117 switch p {
118 case pruned:
· · ·
127}
128
129func pruningForGoVersion(goVersion string) modPruning {
130 if gover.Compare(goVersion, gover.ExplicitIndirectVersion) < 0 {
131 // The go.mod file does not duplicate relevant information about transitive
· · ·
137
138// CheckAllowed returns an error equivalent to ErrDisallowed if m is excluded by
139// the main module's go.mod or retracted by its author. Most version queries use
140// this to filter out versions that should not be used.
141func (ld *Loader) CheckAllowed(ctx context.Context, m module.Version) error {
+ 62 more matches in this file
src/crypto/x509/x509.go GO 111 matches · showing 5 view file →
72//
73// This kind of key is commonly encoded in PEM blocks of type "PUBLIC KEY".
74func ParsePKIXPublicKey(derBytes []byte) (pub any, err error) {
75 var pki publicKeyInfo
76 if rest, err := asn1.Unmarshal(derBytes, &pki); err != nil {
· · ·
85}
86
87func marshalPublicKey(pub any) (publicKeyBytes []byte, publicKeyAlgorithm pkix.AlgorithmIdentifier, err error) {
88 switch pub := pub.(type) {
89 case *rsa.PublicKey:
· · ·
158//
159// This kind of key is commonly encoded in PEM blocks of type "PUBLIC KEY".
160func MarshalPKIXPublicKey(pub any) ([]byte, error) {
161 var publicKeyBytes []byte
162 var publicKeyAlgorithm pkix.AlgorithmIdentifier
· · ·
246)
247
248func (algo SignatureAlgorithm) isRSAPSS() bool {
249 for _, details := range signatureAlgorithmDetails {
250 if details.algo == algo {
· · ·
255}
256
257func (algo SignatureAlgorithm) hashFunc() crypto.Hash {
258 for _, details := range signatureAlgorithmDetails {
259 if details.algo == algo {
+ 106 more matches in this file
src/cmd/link/internal/benchmark/bench.go GO 9 matches · showing 5 view file →
45// Typical usage should look like:
46//
47// func main() {
48// filename := "" // Set to enable per-phase pprof file output.
49// bench := benchmark.New(benchmark.GC, filename)
· · ·
59// code like:
60//
61// func main() {
62// enableBenchmarking := flag.Bool("enable", true, "enables benchmarking")
63// flag.Parse()
· · ·
69// // etc.
70// }
71func New(gc Flags, filebase string) *Metrics {
72 if gc == GC {
73 runtime.GC()
· · ·
78// Report reports the metrics.
79// Closes the currently Start(ed) range, and writes the report to the given io.Writer.
80func (m *Metrics) Report(w io.Writer) {
81 if m == nil {
82 return
· · ·
109// Start marks the beginning of a new measurement phase.
110// Once a metric is started, it continues until either a Report is issued, or another Start is called.
111func (m *Metrics) Start(name string) {
112 if m == nil {
113 return
+ 4 more matches in this file
src/runtime/pprof/proto.go GO 96 matches · showing 5 view file →
18)
19
20// lostProfileEvent is the function to which lost profiling
21// events are attributed.
22// (The name shows up in the pprof graphs.)
· · ·
23func lostProfileEvent() { lostProfileEvent() }
24
25// A profileBuilder writes a profile incrementally from a
· · ·
39 stringMap map[string]int
40 locs map[uintptr]locInfo // list of locInfo starting with the given PC.
41 funcs map[string]int // Package path-qualified function name to Function.ID
42 mem []memMap
43 deck pcDeck
· · ·
52 buildID string // A string that uniquely identifies a particular program version with high probability.
53
54 funcs symbolizeFlag
55 fake bool // map entry was faked; /proc/self/maps wasn't available
56}
· · ·
74 tagProfile_Mapping = 3 // repeated Mapping
75 tagProfile_Location = 4 // repeated Location
76 tagProfile_Function = 5 // repeated Function
77 tagProfile_StringTable = 6 // repeated string
78 tagProfile_DropFrames = 7 // int64 (string table index)
+ 91 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.