refactor: rename go module
Alan Pearce alan@alanpearce.eu
Sat, 29 Jun 2024 18:11:11 +0200
32 files changed, 80 insertions(+), 62 deletions(-)
jump to
- cmd/searchix-web/main.go
- go.mod
- internal/components/data.go
- internal/components/detail.templ
- internal/components/markdown.templ
- internal/components/optionDetail.templ
- internal/components/options.templ
- internal/components/packageDetail.templ
- internal/components/packages.templ
- internal/components/page.templ
- internal/components/results.templ
- internal/fetcher/channel.go
- internal/fetcher/download.go
- internal/fetcher/http.go
- internal/fetcher/main.go
- internal/fetcher/nixpkgs-channel.go
- internal/importer/importer.go
- internal/importer/main.go
- internal/importer/main_test.go
- internal/importer/options.go
- internal/importer/package.go
- internal/importer/utils.go
- internal/index/index_meta.go
- internal/index/indexer.go
- internal/index/search.go
- internal/nix/importable.go
- internal/opensearch/opensearch.go
- internal/server/error.go
- internal/server/headers.go
- internal/server/mux.go
- internal/server/server.go
- searchix.go
M cmd/searchix-web/main.go → cmd/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 internal/components/data.go → internal/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.templ → internal/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.templ → internal/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.templ → internal/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.templ → internal/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.templ → internal/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.templ → internal/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.templ → internal/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.templ → internal/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.go → internal/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.go → internal/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.go → internal/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.go → internal/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.go → internal/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.go → internal/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.go → internal/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.go → internal/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.go → internal/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.go → internal/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.go → internal/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.go → internal/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.go → internal/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.go → internal/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.go → internal/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.go → internal/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.go → internal/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.go → internal/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.go → internal/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.go → internal/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.go → searchix.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"