Refactor http server

This commit is contained in:
Benedikt Kulmann
2020-11-30 16:48:48 +01:00
parent 90e9a75b07
commit 61cd37113a
4 changed files with 22 additions and 27 deletions
+1 -2
View File
@@ -40,7 +40,6 @@ func Server(cfg *config.Config) *cli.Command {
},
Action: func(c *cli.Context) error {
logger := NewLogger(cfg)
httpNamespace := c.String("http-namespace")
if cfg.Tracing.Enabled {
switch t := cfg.Tracing.Type; t {
@@ -136,8 +135,8 @@ func Server(cfg *config.Config) *cli.Command {
{
server, err := http.Server(
http.Name("onlyoffice"),
http.Logger(logger),
http.Namespace(httpNamespace),
http.Context(ctx),
http.Config(cfg),
http.Metrics(metrics),