remove environment
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user