55 matches across 2 files for func main lang:Go lang:Go lang:Go path:main_test.go lang:Go path:main_test.go path:main_test.go
snippet_mode: auto · sorted by relevance
1▶package main
2
3import (
· · ·
14)
15
16▶const sccTestFlag string = "-test.main"
17
18var sccBinPath = os.Args[0]
· · ·
19
20▶func TestMain(m *testing.M) {
21 idx := slices.Index(os.Args, sccTestFlag)
22 if idx != -1 {
· · ·
23 os.Args = slices.Delete(os.Args, idx, idx+1)
24▶ main()
25 return
26 }
· · ·
29}
30
31▶func runSCC(args ...string) (string, error) {
32 args = slices.Insert(args, 0, sccTestFlag)
33 cmd := exec.Command(sccBinPath, args...)
+ 41 more matches in this file
1▶package main
2
3import (
· · ·
7)
8
9▶func Test_resolveColor(t *testing.T) {
10 tests := []struct {
11 name string
· · ·
55
56 for _, tt := range tests {
57▶ t.Run(tt.name, func(t *testing.T) {
58 if got := resolveColor(tt.color); got != tt.want {
59 t.Errorf("resolveColor(%q) = %q, want %q", tt.color, got, tt.want)
· · ·
63}
64
65▶func Test_formatCount(t *testing.T) {
66 type args struct {
67 count float64
· · ·
123 }
124 for _, tt := range tests {
125▶ t.Run(tt.name, func(t *testing.T) {
126 if got := formatCount(tt.args.count); got != tt.want {
127 t.Errorf("formatCount() = %v, want %v", got, tt.want)
+ 4 more matches in this file
Search syntax
auth login | both terms (AND is implicit) |
auth OR login | either term |
NOT path:vendor | exclude matches |
"exact phrase" | quoted exact match |
/func\s+Test/ | regex |
handler~1 | fuzzy (Levenshtein 1) |
file:*_test.go | filename glob |
path:pkg/auth/** | full path glob |
lang:go | language 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.