aboutsummaryrefslogtreecommitdiff
path: root/README.md
diff options
context:
space:
mode:
authoradnano <[email protected]>2020-09-27 20:20:59 -0400
committeradnano <[email protected]>2020-09-27 20:20:59 -0400
commit38fe1f21dc8d356157845bf7b930291d54879def (patch)
tree45024a1f6f5e95952a30f7111bc8e40d9208ebe7 /README.md
parentAdd helper handler functions (diff)
downloadgo-gemini-38fe1f21dc8d356157845bf7b930291d54879def.tar.xz
go-gemini-38fe1f21dc8d356157845bf7b930291d54879def.zip
Change package name to gmi
Diffstat (limited to 'README.md')
-rw-r--r--README.md4
1 files changed, 2 insertions, 2 deletions
diff --git a/README.md b/README.md
index 4847217..daa3ffb 100644
--- a/README.md
+++ b/README.md
@@ -59,7 +59,7 @@ gemini.Send(req)
Clients can also load their own list of known hosts:
```go
-client := &Client{}
+client := &gmi.Client{}
if err := client.KnownHosts.LoadFrom("path/to/my/known_hosts"); err != nil {
log.Fatal(err)
}
@@ -69,7 +69,7 @@ Clients can then specify how to trust certificates in the `TrustCertificate`
field:
```go
-client.TrustCertificate = func(hostname string, cert *x509.Certificate, knownHosts *gemini.KnownHosts) error {
+client.TrustCertificate = func(hostname string, cert *x509.Certificate, knownHosts *gmi.KnownHosts) error {
// If the certificate is in the known hosts list, allow the connection
return knownHosts.Lookup(hostname, cert)
}