all repos — homestead @ 4c07535d9120fb999b0c008f1866972865f424f7

Code for my website

replace tozd/errors with Southclaws/fault

Alan Pearce
commit

4c07535d9120fb999b0c008f1866972865f424f7

parent

90a4ac43b915abb7a2949f4b5313b40d705b6071

1 file changed, 4 insertions(+), 4 deletions(-)

changed files
M internal/server/tcp.gointernal/server/tcp.go
@@ -4,11 +4,11 @@ import (
"net" "strconv" - "gitlab.com/tozd/go/errors" + "github.com/Southclaws/fault" "go.alanpearce.eu/x/listenfd" ) -func (s *Server) serveTCP() errors.E { +func (s *Server) serveTCP() error { addr := joinHostPort(s.options.ListenAddress, s.options.Port) s.log.Debug( "fallback listener",
@@ -17,10 +17,10 @@ addr,
) l, err := listenfd.GetListener(0, addr, s.log.Named("tcp.listenfd")) if err != nil { - return errors.WithStack(err) + return fault.Wrap(err) } - return errors.WithStack(s.server.Serve(l)) + return fault.Wrap(s.server.Serve(l)) } func joinHostPort(host string, port int) string {