From 23bc5f4fb7542e64c94eaa7fe2c7a6aa55010898 Mon Sep 17 00:00:00 2001 From: tjpcc Date: Sat, 12 Aug 2023 09:40:39 -0600 Subject: move common types to an internal package This helps avoid import cycles. --- spartan/serve.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'spartan/serve.go') diff --git a/spartan/serve.go b/spartan/serve.go index a477a45..4b37f6a 100644 --- a/spartan/serve.go +++ b/spartan/serve.go @@ -8,14 +8,14 @@ import ( "io" "net" - sr "tildegit.org/tjp/sliderule" + "tildegit.org/tjp/sliderule/internal/types" "tildegit.org/tjp/sliderule/internal" "tildegit.org/tjp/sliderule/logging" ) type spartanServer struct { internal.Server - handler sr.Handler + handler types.Handler } func (ss spartanServer) Protocol() string { return "SPARTAN" } @@ -26,9 +26,9 @@ func NewServer( hostname string, network string, address string, - handler sr.Handler, + handler types.Handler, errLog logging.Logger, -) (sr.Server, error) { +) (types.Server, error) { ss := &spartanServer{handler: handler} hostname = internal.JoinDefaultPort(hostname, "300") @@ -46,7 +46,7 @@ func NewServer( func (ss *spartanServer) handleConn(conn net.Conn) { buf := bufio.NewReader(conn) - var response *sr.Response + var response *types.Response request, clen, err := ParseRequest(buf) if err != nil { response = ClientError(err) -- cgit v1.2.3