summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gemini/gemtext/parse_line.go1
-rw-r--r--gemini/roundtrip_test.go2
-rw-r--r--gemini/serve.go2
-rw-r--r--logging/middleware.go2
4 files changed, 2 insertions, 5 deletions
diff --git a/gemini/gemtext/parse_line.go b/gemini/gemtext/parse_line.go
index e31e5b6..faf457d 100644
--- a/gemini/gemtext/parse_line.go
+++ b/gemini/gemtext/parse_line.go
@@ -19,7 +19,6 @@ func ParseLine(line []byte) Line {
if line[1] == ':' {
return parsePromptLine(line)
}
- break
case '`':
if len(line) < 3 || line[1] != '`' || line[2] != '`' {
break
diff --git a/gemini/roundtrip_test.go b/gemini/roundtrip_test.go
index 67b1ae0..0aa5648 100644
--- a/gemini/roundtrip_test.go
+++ b/gemini/roundtrip_test.go
@@ -62,7 +62,7 @@ func TestTitanRequest(t *testing.T) {
return gemini.Success("", nil)
}
- bodyBytes, err := io.ReadAll(body.(io.Reader))
+ bodyBytes, err := io.ReadAll(body)
require.Nil(t, err)
assert.Equal(t, "the request body\n", string(bodyBytes))
diff --git a/gemini/serve.go b/gemini/serve.go
index a439ce0..9173212 100644
--- a/gemini/serve.go
+++ b/gemini/serve.go
@@ -16,8 +16,6 @@ import (
"tildegit.org/tjp/sliderule/logging"
)
-type titanRequestBodyKey struct{}
-
type server struct {
internal.Server
diff --git a/logging/middleware.go b/logging/middleware.go
index b19c273..750f987 100644
--- a/logging/middleware.go
+++ b/logging/middleware.go
@@ -18,7 +18,7 @@ func LogRequests(logger Logger) sr.Middleware {
response.Body = loggingBody(logger, request, response, start)
} else {
end := time.Now()
- logger.Log(
+ _ = logger.Log(
"msg", "request",
"ts", end.UTC(),
"dur", end.Sub(start),