summaryrefslogtreecommitdiff
path: root/gemini/request.go
diff options
context:
space:
mode:
Diffstat (limited to 'gemini/request.go')
-rw-r--r--gemini/request.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/gemini/request.go b/gemini/request.go
index 8fa1e40..4d75381 100644
--- a/gemini/request.go
+++ b/gemini/request.go
@@ -11,8 +11,8 @@ import (
"tildegit.org/tjp/sliderule/internal/types"
)
-// InvalidRequestLineEnding indicates that a gemini request didn't end with "\r\n".
-var InvalidRequestLineEnding = errors.New("invalid request line ending")
+// ErrInvalidRequestLineEnding indicates that a gemini request didn't end with "\r\n".
+var ErrInvalidRequestLineEnding = errors.New("invalid request line ending")
// ParseRequest parses a single gemini/titan request from a reader.
//
@@ -29,7 +29,7 @@ func ParseRequest(rdr io.Reader) (*types.Request, error) {
}
if len(line) < 2 || line[len(line)-2:] != "\r\n" {
- return nil, InvalidRequestLineEnding
+ return nil, ErrInvalidRequestLineEnding
}
u, err := url.Parse(line[:len(line)-2])