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:
parent
14bb7f1086
commit
39207a1cb5
7 changed files with 8 additions and 47 deletions
|
|
@ -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)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,6 +1,8 @@
|
|||
package cmd
|
||||
|
||||
import (
|
||||
"net"
|
||||
|
||||
wisski_distillery "github.com/FAU-CDI/wisski-distillery"
|
||||
"github.com/FAU-CDI/wisski-distillery/internal/cli"
|
||||
"github.com/tkw1536/goprogram/exit"
|
||||
|
|
@ -39,7 +41,7 @@ func (s ssh) Run(context wisski_distillery.Context) error {
|
|||
context.Printf("Listening on %s\n", s.Bind)
|
||||
|
||||
// make a new listener
|
||||
listener, err := dis.Still.Environment.Listen("tcp", s.Bind)
|
||||
listener, err := net.Listen("tcp", s.Bind)
|
||||
if err != nil {
|
||||
return errServerListen.Wrap(err)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue