refactor: remove SearXNG references and rename binary to kafka
- Rename cmd/searxng-go to cmd/kafka - Remove all SearXNG references from source comments while keeping "SearXNG-compatible API" in user-facing docs - Update binary paths in README, CLAUDE.md, and Dockerfile - Update log message to "kafka starting" Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
4482cb4dde
commit
fcd9be16df
18 changed files with 47 additions and 48 deletions
|
|
@ -11,7 +11,7 @@ import (
|
|||
"time"
|
||||
)
|
||||
|
||||
// Service fetches search suggestions from an upstream SearXNG instance
|
||||
// Service fetches search suggestions from an upstream metasearch instance
|
||||
// or falls back to Wikipedia's OpenSearch API.
|
||||
type Service struct {
|
||||
upstreamURL string
|
||||
|
|
@ -40,7 +40,7 @@ func (s *Service) Suggestions(ctx context.Context, query string) ([]string, erro
|
|||
return s.wikipediaSuggestions(ctx, query)
|
||||
}
|
||||
|
||||
// upstreamSuggestions proxies to an upstream SearXNG /autocompleter endpoint.
|
||||
// upstreamSuggestions proxies to an upstream /autocompleter endpoint.
|
||||
func (s *Service) upstreamSuggestions(ctx context.Context, query string) ([]string, error) {
|
||||
u := s.upstreamURL + "/autocompleter?" + url.Values{"q": {query}}.Encode()
|
||||
req, err := http.NewRequestWithContext(ctx, http.MethodGet, u, nil)
|
||||
|
|
@ -64,7 +64,7 @@ func (s *Service) upstreamSuggestions(ctx context.Context, query string) ([]stri
|
|||
return nil, err
|
||||
}
|
||||
|
||||
// SearXNG /autocompleter returns a plain JSON array of strings.
|
||||
// The /autocompleter endpoint returns a plain JSON array of strings.
|
||||
var out []string
|
||||
if err := json.Unmarshal(body, &out); err != nil {
|
||||
return nil, err
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue