diff --git a/doc.go b/doc.go index e858ee7..f90d6d3 100644 --- a/doc.go +++ b/doc.go @@ -8,7 +8,7 @@ Client is a Gemini client. if err != nil { // handle error } - if resp.Status.Class() == gemini.StatusClassSucess { + if resp.Body != nil { defer resp.Body.Close() // ... } @@ -17,8 +17,8 @@ Client is a Gemini client. Server is a Gemini server. server := &gemini.Server{ - ReadTimeout: 10 * time.Second, - WriteTimeout: 10 * time.Second, + ReadTimeout: 10 * time.Second, + WriteTimeout: 10 * time.Second, } Servers should be configured with certificates: