diff options
author | Alan Pearce | 2024-05-13 23:04:50 +0200 |
---|---|---|
committer | Alan Pearce | 2024-05-13 23:04:50 +0200 |
commit | 6fed92fd9acc567e6a1ebd939402b9198da40b86 (patch) | |
tree | 4d2d2697b9485563727824a4a4064b9fe8458421 /internal/server | |
parent | 45432ae8006322e89f89f43423ff26c99d98de10 (diff) | |
download | searchix-6fed92fd9acc567e6a1ebd939402b9198da40b86.tar.lz searchix-6fed92fd9acc567e6a1ebd939402b9198da40b86.tar.zst searchix-6fed92fd9acc567e6a1ebd939402b9198da40b86.zip |
style: make port a string for easier nix integration
Diffstat (limited to 'internal/server')
-rw-r--r-- | internal/server/server.go | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/internal/server/server.go b/internal/server/server.go index bb0a6ad..6c4b732 100644 --- a/internal/server/server.go +++ b/internal/server/server.go @@ -8,6 +8,7 @@ import ( "net/http" "searchix/internal/config" "searchix/internal/index" + "strconv" "time" "github.com/pkg/errors" @@ -22,7 +23,7 @@ func New(conf *config.Config, index *index.ReadIndex, liveReload bool) (*Server, if err != nil { return nil, err } - listenAddress := net.JoinHostPort(conf.Web.ListenAddress, conf.Web.Port) + listenAddress := net.JoinHostPort(conf.Web.ListenAddress, strconv.Itoa(conf.Web.Port)) return &Server{ &http.Server{ |