aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoradnano <[email protected]>2020-10-11 19:41:44 -0400
committeradnano <[email protected]>2020-10-11 19:41:44 -0400
commit92af3df4c57d603e0017290abf9a4cd118379bbb (patch)
treeb9113587c61c63218ff2804ca596ff81a2a5d1b2
parentMove filesystem code to its own file (diff)
downloadgo-gemini-92af3df4c57d603e0017290abf9a4cd118379bbb.tar.xz
go-gemini-92af3df4c57d603e0017290abf9a4cd118379bbb.zip
Update comments
-rw-r--r--server.go3
-rw-r--r--text.go2
2 files changed, 2 insertions, 3 deletions
diff --git a/server.go b/server.go
index d88cb60..f21863f 100644
--- a/server.go
+++ b/server.go
@@ -308,7 +308,6 @@ func PermanentRedirect(rw *ResponseWriter, req *Request, url string) {
// PermanentRedirectHandler returns a simple handler that responds to each request with
// a redirect to the given URL.
-// If permanent is true, the handler will respond with a permanent redirect.
func PermanentRedirectHandler(url string) Handler {
return HandlerFunc(func(rw *ResponseWriter, req *Request) {
PermanentRedirect(rw, req, url)
@@ -369,7 +368,7 @@ func CertificateHandler(f func(*x509.Certificate)) Handler {
})
}
-// A wrapper around a bare function that implements Handler.
+// HandlerFunc is a wrapper around a bare function that implements Handler.
type HandlerFunc func(*ResponseWriter, *Request)
func (f HandlerFunc) Serve(rw *ResponseWriter, req *Request) {
diff --git a/text.go b/text.go
index 5130e8a..b0928de 100644
--- a/text.go
+++ b/text.go
@@ -114,7 +114,7 @@ func Parse(r io.Reader) Text {
return t
}
-// String writes the Gemini text response to a string, and returns it.
+// String writes the Gemini text response to a string and returns it.
func (t Text) String() string {
var b strings.Builder
for _, l := range t {