all repos — searchix @ a597c5df0f9f19058b2c83fde7e7777e1d762581

Search engine for NixOS, nix-darwin, home-manager and NUR users

refactor: rename go module
Alan Pearce alan@alanpearce.eu
Sat, 29 Jun 2024 18:11:11 +0200
commit

a597c5df0f9f19058b2c83fde7e7777e1d762581

parent

9f01a82186f3ba8e89e1d80c75112fea38858856

M cmd/searchix-web/main.gocmd/searchix-web/main.go
@@ -11,8 +11,8 @@ "os/signal" 
 	"badc0de.net/pkg/flagutil"
 
-	"searchix"
-	"searchix/internal/config"
+	"go.alanpearce.eu/searchix"
+	"go.alanpearce.eu/searchix/internal/config"
 )
 
 var (
M go.modgo.mod
@@ -1,4 +1,4 @@-module searchix
+module go.alanpearce.eu/searchix
 
 go 1.22.2
 
M internal/components/data.gointernal/components/data.go
@@ -1,10 +1,10 @@ package components
 
 import (
-	"searchix/frontend"
-	"searchix/internal/config"
-	search "searchix/internal/index"
-	"searchix/internal/nix"
+	"go.alanpearce.eu/searchix/frontend"
+	"go.alanpearce.eu/searchix/internal/config"
+	search "go.alanpearce.eu/searchix/internal/index"
+	"go.alanpearce.eu/searchix/internal/nix"
 
 	"github.com/blevesearch/bleve/v2"
 )
M internal/components/detail.templinternal/components/detail.templ
@@ -1,7 +1,7 @@ package components
 
 import (
-	"searchix/internal/nix"
+	"go.alanpearce.eu/searchix/internal/nix"
 )
 
 templ Detail(thing nix.Importable) {
M internal/components/markdown.templinternal/components/markdown.templ
@@ -3,7 +3,7 @@ import (
 	"regexp"
 
-	"searchix/internal/nix"
+	"go.alanpearce.eu/searchix/internal/nix"
 
 	"github.com/yuin/goldmark"
 	"github.com/yuin/goldmark/extension"
M internal/components/optionDetail.templinternal/components/optionDetail.templ
@@ -1,6 +1,6 @@ package components
 
-import "searchix/internal/nix"
+import "go.alanpearce.eu/searchix/internal/nix"
 
 templ OptionDetail(option nix.Option) {
 	<h2>{ option.Name }</h2>
M internal/components/options.templinternal/components/options.templ
@@ -1,8 +1,8 @@ package components
 
 import (
-	"searchix/internal/index"
-	"searchix/internal/nix"
+	"go.alanpearce.eu/searchix/internal/index"
+	"go.alanpearce.eu/searchix/internal/nix"
 )
 
 templ Options(result *index.Result) {
M internal/components/packageDetail.templinternal/components/packageDetail.templ
@@ -1,7 +1,7 @@ package components
 
 import (
-	"searchix/internal/nix"
+	"go.alanpearce.eu/searchix/internal/nix"
 )
 
 func licenseName(l nix.License) string {
M internal/components/packages.templinternal/components/packages.templ
@@ -1,8 +1,8 @@ package components
 
 import (
-	"searchix/internal/index"
-	"searchix/internal/nix"
+	"go.alanpearce.eu/searchix/internal/index"
+	"go.alanpearce.eu/searchix/internal/nix"
 )
 
 templ Packages(result *index.Result) {
M internal/components/page.templinternal/components/page.templ
@@ -3,8 +3,8 @@ import (
 	"net/url"
 
-	"searchix/internal/config"
-	"searchix/frontend"
+	"go.alanpearce.eu/searchix/internal/config"
+	"go.alanpearce.eu/searchix/frontend"
 )
 
 templ Page(tdata TemplateData) {
M internal/components/results.templinternal/components/results.templ
@@ -3,7 +3,7 @@ import (
 	"strconv"
 	"log/slog"
-	"searchix/internal/nix"
+	"go.alanpearce.eu/searchix/internal/nix"
 )
 
 func convertMatch[I nix.Importable](m nix.Importable) *I {
M internal/fetcher/channel.gointernal/fetcher/channel.go
@@ -7,11 +7,12 @@ "log/slog" 	"os"
 	"os/exec"
 	"path"
-	"searchix/internal/config"
-	"searchix/internal/index"
 	"strconv"
 	"strings"
 	"time"
+
+	"go.alanpearce.eu/searchix/internal/config"
+	"go.alanpearce.eu/searchix/internal/index"
 
 	"github.com/pkg/errors"
 )
M internal/fetcher/download.gointernal/fetcher/download.go
@@ -5,8 +5,9 @@ "context" 	"fmt"
 	"log/slog"
 	"net/url"
-	"searchix/internal/config"
-	"searchix/internal/index"
+
+	"go.alanpearce.eu/searchix/internal/config"
+	"go.alanpearce.eu/searchix/internal/index"
 
 	"github.com/pkg/errors"
 )
M internal/fetcher/http.gointernal/fetcher/http.go
@@ -6,9 +6,10 @@ "fmt" 	"io"
 	"log/slog"
 	"net/http"
-	"searchix/internal/config"
 	"strings"
 	"time"
+
+	"go.alanpearce.eu/searchix/internal/config"
 
 	"github.com/andybalholm/brotli"
 	"github.com/pkg/errors"
M internal/fetcher/main.gointernal/fetcher/main.go
@@ -4,8 +4,9 @@ import ( 	"context"
 	"io"
 	"log/slog"
-	"searchix/internal/config"
-	"searchix/internal/index"
+
+	"go.alanpearce.eu/searchix/internal/config"
+	"go.alanpearce.eu/searchix/internal/index"
 
 	"github.com/pkg/errors"
 )
M internal/fetcher/nixpkgs-channel.gointernal/fetcher/nixpkgs-channel.go
@@ -5,8 +5,9 @@ "context" 	"fmt"
 	"log/slog"
 	"net/url"
-	"searchix/internal/config"
-	"searchix/internal/index"
+
+	"go.alanpearce.eu/searchix/internal/config"
+	"go.alanpearce.eu/searchix/internal/index"
 
 	"github.com/pkg/errors"
 )
M internal/importer/importer.gointernal/importer/importer.go
@@ -3,9 +3,10 @@ import (
 	"context"
 	"log/slog"
-	"searchix/internal/index"
-	"searchix/internal/nix"
 	"sync"
+
+	"go.alanpearce.eu/searchix/internal/index"
+	"go.alanpearce.eu/searchix/internal/nix"
 )
 
 type Importer interface {
M internal/importer/main.gointernal/importer/main.go
@@ -5,12 +5,13 @@ "context" 	"fmt"
 	"log/slog"
 	"os/exec"
-	"searchix/internal/config"
-	"searchix/internal/fetcher"
-	"searchix/internal/index"
 	"slices"
 	"strings"
 	"time"
+
+	"go.alanpearce.eu/searchix/internal/config"
+	"go.alanpearce.eu/searchix/internal/fetcher"
+	"go.alanpearce.eu/searchix/internal/index"
 
 	"github.com/pkg/errors"
 )
M internal/importer/main_test.gointernal/importer/main_test.go
@@ -2,9 +2,10 @@ package importer 
 import (
 	"log/slog"
-	"searchix/internal/config"
-	"searchix/internal/index"
 	"testing"
+
+	"go.alanpearce.eu/searchix/internal/config"
+	"go.alanpearce.eu/searchix/internal/index"
 )
 
 var cfg = config.DefaultConfig
M internal/importer/options.gointernal/importer/options.go
@@ -5,8 +5,9 @@ "context" 	"io"
 	"log/slog"
 	"reflect"
-	"searchix/internal/config"
-	"searchix/internal/nix"
+
+	"go.alanpearce.eu/searchix/internal/config"
+	"go.alanpearce.eu/searchix/internal/nix"
 
 	"github.com/bcicen/jstream"
 	"github.com/mitchellh/mapstructure"
M internal/importer/package.gointernal/importer/package.go
@@ -5,9 +5,10 @@ "context" 	"encoding/json"
 	"io"
 	"reflect"
-	"searchix/internal/config"
-	"searchix/internal/nix"
 	"strings"
+
+	"go.alanpearce.eu/searchix/internal/config"
+	"go.alanpearce.eu/searchix/internal/nix"
 
 	"github.com/bcicen/jstream"
 	"github.com/mitchellh/mapstructure"
M internal/importer/utils.gointernal/importer/utils.go
@@ -4,9 +4,10 @@ import ( 	"fmt"
 	"io"
 	"net/url"
-	"searchix/internal/config"
-	"searchix/internal/nix"
 	"strings"
+
+	"go.alanpearce.eu/searchix/internal/config"
+	"go.alanpearce.eu/searchix/internal/nix"
 
 	"github.com/bcicen/jstream"
 	"github.com/pkg/errors"
M internal/index/index_meta.gointernal/index/index_meta.go
@@ -4,8 +4,9 @@ import ( 	"encoding/json"
 	"log/slog"
 	"os"
-	"searchix/internal/file"
 	"time"
+
+	"go.alanpearce.eu/searchix/internal/file"
 
 	"github.com/pkg/errors"
 )
M internal/index/indexer.gointernal/index/indexer.go
@@ -10,9 +10,10 @@ "log/slog" 	"math"
 	"os"
 	"path"
-	"searchix/internal/file"
-	"searchix/internal/nix"
 	"slices"
+
+	"go.alanpearce.eu/searchix/internal/file"
+	"go.alanpearce.eu/searchix/internal/nix"
 
 	"github.com/blevesearch/bleve/v2"
 	"github.com/blevesearch/bleve/v2/analysis/analyzer/custom"
M internal/index/search.gointernal/index/search.go
@@ -4,8 +4,9 @@ import ( 	"bytes"
 	"context"
 	"encoding/gob"
-	"searchix/internal/config"
-	"searchix/internal/nix"
+
+	"go.alanpearce.eu/searchix/internal/config"
+	"go.alanpearce.eu/searchix/internal/nix"
 
 	"github.com/blevesearch/bleve/v2"
 	"github.com/blevesearch/bleve/v2/analysis/analyzer/standard"
M internal/nix/importable.gointernal/nix/importable.go
@@ -2,7 +2,8 @@ package nix 
 import (
 	"encoding/gob"
-	"searchix/internal/config"
+
+	"go.alanpearce.eu/searchix/internal/config"
 )
 
 type Importable interface {
M internal/opensearch/opensearch.gointernal/opensearch/opensearch.go
@@ -2,7 +2,8 @@ package opensearch 
 import (
 	"encoding/xml"
-	"searchix/internal/config"
+
+	"go.alanpearce.eu/searchix/internal/config"
 )
 
 type Description struct {
M internal/server/error.gointernal/server/error.go
@@ -4,8 +4,8 @@ import ( 	"log/slog"
 	"net/http"
 
-	"searchix/internal/components"
-	"searchix/internal/config"
+	"go.alanpearce.eu/searchix/internal/components"
+	"go.alanpearce.eu/searchix/internal/config"
 )
 
 func createErrorHandler(
M internal/server/headers.gointernal/server/headers.go
@@ -2,7 +2,8 @@ package server 
 import (
 	"net/http"
-	cfg "searchix/internal/config"
+
+	cfg "go.alanpearce.eu/searchix/internal/config"
 )
 
 func AddHeadersMiddleware(next http.Handler, config *cfg.Config) http.Handler {
@@ -11,7 +12,7 @@ for h, v := range config.Web.Headers { 			w.Header().Add(h, v)
 		}
 		w.Header().Add("Content-Security-Policy", config.Web.ContentSecurityPolicy.String())
-		w.Header().Add("Server", "searchix/"+cfg.Version)
+		w.Header().Add("Server", "go.alanpearce.eu/searchix/"+cfg.Version)
 
 		next.ServeHTTP(w, r)
 	})
M internal/server/mux.gointernal/server/mux.go
@@ -14,11 +14,11 @@ "path" 	"strconv"
 	"time"
 
-	"searchix/frontend"
-	"searchix/internal/components"
-	"searchix/internal/config"
-	search "searchix/internal/index"
-	"searchix/internal/opensearch"
+	"go.alanpearce.eu/searchix/frontend"
+	"go.alanpearce.eu/searchix/internal/components"
+	"go.alanpearce.eu/searchix/internal/config"
+	search "go.alanpearce.eu/searchix/internal/index"
+	"go.alanpearce.eu/searchix/internal/opensearch"
 
 	sentryhttp "github.com/getsentry/sentry-go/http"
 	"github.com/osdevisnot/sorvor/pkg/livereload"
M internal/server/server.gointernal/server/server.go
@@ -5,10 +5,11 @@ "context" 	"log/slog"
 	"net"
 	"net/http"
-	"searchix/internal/config"
-	"searchix/internal/index"
 	"strconv"
 	"time"
+
+	"go.alanpearce.eu/searchix/internal/config"
+	"go.alanpearce.eu/searchix/internal/index"
 
 	"github.com/pkg/errors"
 	"golang.org/x/net/http2"
M searchix.gosearchix.go
@@ -8,10 +8,10 @@ "slices" 	"sync"
 	"time"
 
-	"searchix/internal/config"
-	"searchix/internal/importer"
-	"searchix/internal/index"
-	"searchix/internal/server"
+	"go.alanpearce.eu/searchix/internal/config"
+	"go.alanpearce.eu/searchix/internal/importer"
+	"go.alanpearce.eu/searchix/internal/index"
+	"go.alanpearce.eu/searchix/internal/server"
 
 	"github.com/getsentry/sentry-go"
 	"github.com/pelletier/go-toml/v2"