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. --- finger/response.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'finger/response.go') diff --git a/finger/response.go b/finger/response.go index 8612f45..db2dfb0 100644 --- a/finger/response.go +++ b/finger/response.go @@ -5,18 +5,18 @@ import ( "io" "strings" - sr "tildegit.org/tjp/sliderule" + "tildegit.org/tjp/sliderule/internal/types" ) // Error produces a finger Response containing the error message and Status 1. -func Error(msg string) *sr.Response { +func Error(msg string) *types.Response { if !strings.HasSuffix(msg, "\r\n") { msg += "\r\n" } - return &sr.Response{Body: bytes.NewBufferString(msg), Status: 1} + return &types.Response{Body: bytes.NewBufferString(msg), Status: 1} } // Success produces a finger response with a Status of 0. -func Success(body io.Reader) *sr.Response { - return &sr.Response{Body: body} +func Success(body io.Reader) *types.Response { + return &types.Response{Body: body} } -- cgit v1.2.3