55 matches across 2 files for func main path:main_test.go
snippet_mode: grep · sorted by relevance
cmd/badges/main_test.go GO 9 matches · showing 5 view file →
1package main
2
3import (
· · ·
7)
8
9func 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
65func 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
main_test.go GO 46 matches · showing 5 view file →
1package main
2
3import (
· · ·
14)
15
16const sccTestFlag string = "-test.main"
17
18var sccBinPath = os.Args[0]
· · ·
19
20func 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
31func runSCC(args ...string) (string, error) {
32 args = slices.Insert(args, 0, sccTestFlag)
33 cmd := exec.Command(sccBinPath, args...)
+ 41 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.