pkg/environment: Remove 'net' related functions

This commit continues removing the environment abstraction and removes
all 'net' related functions, replacing them by their native equivalents.
This commit is contained in:
Tom Wiesing 2023-03-02 11:07:50 +01:00
parent 14bb7f1086
commit 39207a1cb5
No known key found for this signature in database
7 changed files with 8 additions and 47 deletions

View file

@ -1,6 +1,7 @@
package cmd
import (
"net"
"net/http"
wisski_distillery "github.com/FAU-CDI/wisski-distillery"
@ -64,7 +65,7 @@ func (s server) Run(context wisski_distillery.Context) error {
publicC := make(chan error)
{
zerolog.Ctx(context.Context).Info().Str("bind", s.Bind).Msg("listening public server")
publicL, err := dis.Still.Environment.Listen("tcp", s.Bind)
publicL, err := net.Listen("tcp", s.Bind)
if err != nil {
return errServerListen.Wrap(err)
}
@ -79,7 +80,7 @@ func (s server) Run(context wisski_distillery.Context) error {
internalC := make(chan error)
{
zerolog.Ctx(context.Context).Info().Str("bind", s.InternalBind).Msg("listening internal server")
internalL, err := dis.Still.Environment.Listen("tcp", s.InternalBind)
internalL, err := net.Listen("tcp", s.InternalBind)
if err != nil {
return errServerListen.Wrap(err)
}