From a597c5df0f9f19058b2c83fde7e7777e1d762581 Mon Sep 17 00:00:00 2001 From: Alan Pearce Date: Sat, 29 Jun 2024 18:11:11 +0200 Subject: refactor: rename go module --- internal/server/error.go | 4 ++-- internal/server/headers.go | 5 +++-- internal/server/mux.go | 10 +++++----- internal/server/server.go | 5 +++-- 4 files changed, 13 insertions(+), 11 deletions(-) (limited to 'internal/server') diff --git a/internal/server/error.go b/internal/server/error.go index 4a8acbc..d9d6778 100644 --- a/internal/server/error.go +++ b/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( diff --git a/internal/server/headers.go b/internal/server/headers.go index 7ff9fb9..9a54380 100644 --- a/internal/server/headers.go +++ b/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 @@ func AddHeadersMiddleware(next http.Handler, config *cfg.Config) http.Handler { 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) }) diff --git a/internal/server/mux.go b/internal/server/mux.go index 8ca5758..d0984da 100644 --- a/internal/server/mux.go +++ b/internal/server/mux.go @@ -14,11 +14,11 @@ import ( "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" diff --git a/internal/server/server.go b/internal/server/server.go index 38200bb..c3c2a4d 100644 --- a/internal/server/server.go +++ b/internal/server/server.go @@ -5,11 +5,12 @@ import ( "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" "golang.org/x/net/http2/h2c" -- cgit 1.4.1