summaryrefslogtreecommitdiff
path: root/gemini
diff options
context:
space:
mode:
authortjpcc <tjp@ctrl-c.club>2023-08-12 08:48:11 -0600
committertjpcc <tjp@ctrl-c.club>2023-08-12 08:48:11 -0600
commitbb4bbc5659a506533eb2d45f102ea394e050cee2 (patch)
tree8bd04a56c6f3b2869111a5703a0d62eef4b9d35f /gemini
parentb423ed96c71bdd1cdecc4129a26d2dbcaa91dafe (diff)
document maxredirects on clients
Diffstat (limited to 'gemini')
-rw-r--r--gemini/client.go5
1 files changed, 3 insertions, 2 deletions
diff --git a/gemini/client.go b/gemini/client.go
index b677483..e81e64a 100644
--- a/gemini/client.go
+++ b/gemini/client.go
@@ -17,14 +17,15 @@ import (
// The only reason you might create more than one Client is to support separate TLS-cert
// driven identities.
//
-// The zero value is a usable Client with no client TLS certificate.
+// The zero value is a usable Client with no client TLS certificate and which will not
+// follow redirects.
type Client struct {
MaxRedirects int
tlsConf *tls.Config
}
-// Create a gemini Client with the given TLS configuration.
+// NewClient creates a gemini Client with the given TLS configuration and default MaxRedirects.
func NewClient(tlsConf *tls.Config) Client {
return Client{tlsConf: tlsConf, MaxRedirects: DefaultMaxRedirects}
}