diff options
author | Alan Pearce | 2024-05-13 21:50:14 +0200 |
---|---|---|
committer | Alan Pearce | 2024-05-13 22:25:46 +0200 |
commit | 6b40e0c0fa90f11be14a93f1d6275779fd645cac (patch) | |
tree | 0df5bea87242450829ca441d235c077a0e09a149 /internal/server/server.go | |
parent | 2722f24af87f437ed9fcb8cc743ad1784141fd3a (diff) | |
download | searchix-6b40e0c0fa90f11be14a93f1d6275779fd645cac.tar.lz searchix-6b40e0c0fa90f11be14a93f1d6275779fd645cac.tar.zst searchix-6b40e0c0fa90f11be14a93f1d6275779fd645cac.zip |
refactor: combine import and web server into one binary
Diffstat (limited to 'internal/server/server.go')
-rw-r--r-- | internal/server/server.go | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/internal/server/server.go b/internal/server/server.go index 77163d3..bb0a6ad 100644 --- a/internal/server/server.go +++ b/internal/server/server.go @@ -7,6 +7,7 @@ import ( "net" "net/http" "searchix/internal/config" + "searchix/internal/index" "time" "github.com/pkg/errors" @@ -16,8 +17,8 @@ type Server struct { *http.Server } -func New(conf *config.Config, liveReload bool) (*Server, error) { - mux, err := NewMux(conf, liveReload) +func New(conf *config.Config, index *index.ReadIndex, liveReload bool) (*Server, error) { + mux, err := NewMux(conf, index, liveReload) if err != nil { return nil, err } |