Update comments
This commit is contained in:
parent
7fdc28d5be
commit
92af3df4c5
@ -308,7 +308,6 @@ func PermanentRedirect(rw *ResponseWriter, req *Request, url string) {
|
|||||||
|
|
||||||
// PermanentRedirectHandler returns a simple handler that responds to each request with
|
// PermanentRedirectHandler returns a simple handler that responds to each request with
|
||||||
// a redirect to the given URL.
|
// a redirect to the given URL.
|
||||||
// If permanent is true, the handler will respond with a permanent redirect.
|
|
||||||
func PermanentRedirectHandler(url string) Handler {
|
func PermanentRedirectHandler(url string) Handler {
|
||||||
return HandlerFunc(func(rw *ResponseWriter, req *Request) {
|
return HandlerFunc(func(rw *ResponseWriter, req *Request) {
|
||||||
PermanentRedirect(rw, req, url)
|
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)
|
type HandlerFunc func(*ResponseWriter, *Request)
|
||||||
|
|
||||||
func (f HandlerFunc) Serve(rw *ResponseWriter, req *Request) {
|
func (f HandlerFunc) Serve(rw *ResponseWriter, req *Request) {
|
||||||
|
2
text.go
2
text.go
@ -114,7 +114,7 @@ func Parse(r io.Reader) Text {
|
|||||||
return t
|
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 {
|
func (t Text) String() string {
|
||||||
var b strings.Builder
|
var b strings.Builder
|
||||||
for _, l := range t {
|
for _, l := range t {
|
||||||
|
Loading…
Reference in New Issue
Block a user