summaryrefslogtreecommitdiff
path: root/finger/response.go
diff options
context:
space:
mode:
authortjpcc <tjp@ctrl-c.club>2023-08-12 09:40:39 -0600
committertjpcc <tjp@ctrl-c.club>2023-08-12 09:40:39 -0600
commit23bc5f4fb7542e64c94eaa7fe2c7a6aa55010898 (patch)
treeec8113d3aa2379e3ca9cb3c6e13a5531895ea8c0 /finger/response.go
parent57a31a9b2cd549174d839b9b91b47db337f174cc (diff)
move common types to an internal package
This helps avoid import cycles.
Diffstat (limited to 'finger/response.go')
-rw-r--r--finger/response.go10
1 files changed, 5 insertions, 5 deletions
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}
}