chore: rename project from gosearch to kafka

A search engine named after a man who proved answers don't exist.

Renamed everywhere user-facing:
- Brand name, UI titles, OpenSearch description, CSS filename
- Docker service name, NixOS module (services.kafka)
- Cache key prefix (kafka:), User-Agent strings (kafka/0.1)
- README, config.example.toml, flake.nix descriptions

Kept unchanged (internal):
- Go module path: github.com/ashie/gosearch
- Git repository URL: git.ashisgreat.xyz/penal-colony/gosearch
- Binary entrypoint: cmd/searxng-go
This commit is contained in:
Franz Kafka 2026-03-21 19:20:47 +00:00
parent be7ba66a09
commit e5295fa69d
16 changed files with 55 additions and 55 deletions

View file

@ -81,7 +81,7 @@ func (c *Cache) Get(ctx context.Context, key string) (contracts.SearchResponse,
return contracts.SearchResponse{}, false
}
fullKey := "gosearch:" + key
fullKey := "kafka:" + key
data, err := c.client.Get(ctx, fullKey).Bytes()
if err != nil {
@ -113,7 +113,7 @@ func (c *Cache) Set(ctx context.Context, key string, resp contracts.SearchRespon
return
}
fullKey := "gosearch:" + key
fullKey := "kafka:" + key
if err := c.client.Set(ctx, fullKey, data, c.ttl).Err(); err != nil {
c.logger.Warn("cache set failed", "key", fullKey, "error", err)
}
@ -124,7 +124,7 @@ func (c *Cache) Invalidate(ctx context.Context, key string) {
if !c.Enabled() {
return
}
fullKey := "gosearch:" + key
fullKey := "kafka:" + key
c.client.Del(ctx, fullKey)
}

View file

@ -9,7 +9,7 @@ import (
"github.com/BurntSushi/toml"
)
// Config is the top-level configuration for the gosearch service.
// Config is the top-level configuration for the kafka service.
type Config struct {
Server ServerConfig `toml:"server"`
Upstream UpstreamConfig `toml:"upstream"`

View file

@ -43,7 +43,7 @@ func (e *BingEngine) Search(ctx context.Context, req contracts.SearchRequest) (c
if err != nil {
return contracts.SearchResponse{}, err
}
httpReq.Header.Set("User-Agent", "gosearch/0.1 (compatible; +https://git.ashisgreat.xyz/penal-colony/gosearch)")
httpReq.Header.Set("User-Agent", "kafka/0.1 (compatible; +https://git.ashisgreat.xyz/penal-colony/gosearch)")
resp, err := e.client.Do(httpReq)
if err != nil {

View file

@ -38,7 +38,7 @@ func (e *DuckDuckGoEngine) Search(ctx context.Context, req contracts.SearchReque
if err != nil {
return contracts.SearchResponse{}, err
}
httpReq.Header.Set("User-Agent", "gosearch/0.1 (compatible; +https://git.ashisgreat.xyz/penal-colony/gosearch)")
httpReq.Header.Set("User-Agent", "kafka/0.1 (compatible; +https://git.ashisgreat.xyz/penal-colony/gosearch)")
resp, err := e.client.Do(httpReq)
if err != nil {

View file

@ -40,7 +40,7 @@ func (e *GitHubEngine) Search(ctx context.Context, req contracts.SearchRequest)
if err != nil {
return contracts.SearchResponse{}, err
}
httpReq.Header.Set("User-Agent", "gosearch/0.1")
httpReq.Header.Set("User-Agent", "kafka/0.1")
httpReq.Header.Set("Accept", "application/vnd.github.v3+json")
resp, err := e.client.Do(httpReq)

View file

@ -90,7 +90,7 @@ func (e *QwantEngine) searchWebAPI(ctx context.Context, req contracts.SearchRequ
if err != nil {
return contracts.SearchResponse{}, err
}
httpReq.Header.Set("User-Agent", "gosearch-go/0.1 (+https://github.com/ashie/gosearch)")
httpReq.Header.Set("User-Agent", "kafka/0.1 (compatible; +https://git.ashisgreat.xyz/penal-colony/gosearch)")
resp, err := e.client.Do(httpReq)
if err != nil {
@ -234,7 +234,7 @@ func (e *QwantEngine) searchWebLite(ctx context.Context, req contracts.SearchReq
if err != nil {
return contracts.SearchResponse{}, err
}
httpReq.Header.Set("User-Agent", "gosearch-go/0.1 (+https://github.com/ashie/gosearch)")
httpReq.Header.Set("User-Agent", "kafka/0.1 (compatible; +https://git.ashisgreat.xyz/penal-colony/gosearch)")
resp, err := e.client.Do(httpReq)
if err != nil {

View file

@ -37,7 +37,7 @@ func (e *RedditEngine) Search(ctx context.Context, req contracts.SearchRequest)
if err != nil {
return contracts.SearchResponse{}, err
}
httpReq.Header.Set("User-Agent", "gosearch/0.1 (compatible; +https://git.ashisgreat.xyz/penal-colony/gosearch)")
httpReq.Header.Set("User-Agent", "kafka/0.1 (compatible; +https://git.ashisgreat.xyz/penal-colony/gosearch)")
resp, err := e.client.Do(httpReq)
if err != nil {

View file

@ -1,4 +1,4 @@
/* gosearch — clean, minimal search engine CSS */
/* kafka — clean, minimal search engine CSS */
/* Inspired by SearXNG's simple theme class conventions */
:root {

View file

@ -6,19 +6,19 @@
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="referrer" content="no-referrer">
<meta name="robots" content="noarchive">
<meta name="description" content="gosearch — a privacy-respecting, open metasearch engine">
<title>{{template "title" .}}gosearch</title>
<link rel="stylesheet" href="/static/css/gosearch.css">
<meta name="description" content="kafka — a privacy-respecting, open metasearch engine">
<title>{{template "title" .}}kafka</title>
<link rel="stylesheet" href="/static/css/kafka.css">
<script src="https://unpkg.com/htmx.org@2.0.4"></script>
<link rel="icon" href="/static/img/favicon.svg" type="image/svg+xml">
<link title="gosearch" type="application/opensearchdescription+xml" rel="search" href="/opensearch.xml">
<link title="kafka" type="application/opensearchdescription+xml" rel="search" href="/opensearch.xml">
</head>
<body class="{{if .Query}}search_on_results{{end}}">
<main>
{{template "content" .}}
</main>
<footer>
<p>Powered by <a href="https://git.ashisgreat.xyz/penal-colony/gosearch">gosearch</a> — a privacy-respecting, open metasearch engine</p>
<p>Powered by <a href="https://git.ashisgreat.xyz/penal-colony/kafka">kafka</a> — a privacy-respecting, open metasearch engine</p>
</footer>
</body>
</html>

View file

@ -1,7 +1,7 @@
{{define "title"}}{{end}}
{{define "content"}}
<div class="index">
<div class="title"><h1>gosearch</h1></div>
<div class="title"><h1>kafka</h1></div>
<div id="search">
<form method="GET" action="/search" role="search">
<input type="text" name="q" id="q" placeholder="Search…" autocomplete="off" autofocus

View file

@ -1,12 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<OpenSearchDescription xmlns="http://a9.com/-/spec/opensearch/1.1/">
<ShortName>gosearch</ShortName>
<ShortName>kafka</ShortName>
<Description>A privacy-respecting, open metasearch engine</Description>
<InputEncoding>UTF-8</InputEncoding>
<OutputEncoding>UTF-8</OutputEncoding>
<LongName>gosearch — Privacy-respecting metasearch</LongName>
<LongName>kafka — Privacy-respecting metasearch</LongName>
<Image width="16" height="16" type="image/svg+xml">/static/img/favicon.svg</Image>
<Contact>https://git.ashisgreat.xyz/penal-colony/gosearch</Contact>
<Contact>https://git.ashisgreat.xyz/penal-colony/kafka</Contact>
<Url type="text/html" method="GET" template="{baseUrl}/search?q={searchTerms}&amp;format=html">
<Param name="pageno" value="{startPage?}" />
<Param name="language" value="{language?}" />