remove environment

This commit is contained in:
rmanach
2025-01-07 10:51:54 +01:00
parent 42a3181797
commit 5e805b5b4d
9 changed files with 95 additions and 101 deletions
-6
View File
@@ -3,7 +3,6 @@ package server
import (
"context"
"errors"
"librapi/services"
"net/http"
"strconv"
"time"
@@ -34,11 +33,6 @@ type Server struct {
type ServerOption func()
func NewServer(ctx context.Context, port int, handlers ...Handler) Server {
if port == 0 {
log.Warn().Int("port", services.GetEnv().GetPort()).Msg("no port detected, set to default")
port = services.GetEnv().GetPort()
}
srvmux := http.NewServeMux()
for _, h := range handlers {
srvmux.HandleFunc(h.url, h.fnHandle)