26 matches across 2 files for error path:main.go
snippet_mode: grep · 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 14 matches · showing 5 view file →
4
5import (
6 "errors"
7 "fmt"
8 "os"
· · ·
17)
18
19func printShellCompletion(cmd *cobra.Command, command string) error {
20 switch command {
21 case "bash":
· · ·
28 return cmd.GenPowerShellCompletion(os.Stdout)
29 default:
30 return errors.New("Unknown shell: " + command)
31 }
32}
· · ·
66 b, err := os.ReadFile(filepath)
67 if err != nil {
68 fmt.Printf("Error reading flags from a file: %s\n", err)
69 os.Exit(1)
70 }
· · ·
377 "z",
378 "identify minified or generated files",
379 func(s string) error { // using func so that last flag wins
380 v, _ := strconv.ParseBool(s)
381 processor.MinifiedGenerated = v
+ 9 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.