22 matches across 2 files for error path:main.go path:main.go lang:Go path:main.go
snippet_mode: auto · sorted by relevance
cmd/badges/main.go GO 12 matches · showing 5 view file →
3import (
4 "context"
5 "errors"
6 "fmt"
7 "math"
· · ·
63
64 if filterBad(loc) {
65 log.Error().Str(uniqueCode, "bfee4bd8").Str("loc", loc.String()).Msg("filter bad")
66 return
67 }
· · ·
71 res, err := process(1, loc)
72 if err != nil {
73 log.Error().Str(uniqueCode, "03ec75c3").Err(err).Str("loc", loc.String()).Send()
74 w.WriteHeader(http.StatusBadRequest)
75 _, _ = w.Write([]byte("something bad happened sorry"))
· · ·
108 addr := ":8080"
109 log.Info().Str(uniqueCode, "1876ce1e").Str("addr", addr).Msg("serving")
110 if err := http.ListenAndServe(addr, nil); err != nil && !errors.Is(err, http.ErrServerClosed) {
111 log.Error().Str(uniqueCode, "c28556e8").Err(err).Send()
112 os.Exit(1)
· · ·
111 log.Error().Str(uniqueCode, "c28556e8").Err(err).Send()
112 os.Exit(1)
113 }
+ 7 more matches in this file
main.go GO 10 matches · showing 5 view file →
4
5import (
6 "errors"
7 "fmt"
8 "os"
· · ·
15)
16
17func printShellCompletion(cmd *cobra.Command, command string) error {
18 switch command {
19 case "bash":
· · ·
26 return cmd.GenPowerShellCompletion(os.Stdout)
27 default:
28 return errors.New("Unknown shell: " + command)
29 }
30}
· · ·
67 b, err := os.ReadFile(filename)
68 if err != nil {
69 fmt.Printf("Error reading flags from a file: %s\n", err)
70 os.Exit(1)
71 }
· · ·
85 if !isCompletionInvocation(os.Args) {
86 noConfig, findRoot, explicitPath := preScanConfig(os.Args)
87 var discoverErr error
88 globalTokens, projectTokens, discoverErr = discoverConfigArgs(noConfig, findRoot, explicitPath)
89 if discoverErr != nil {
+ 5 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.