aboutsummaryrefslogtreecommitdiff
path: root/cert.go
diff options
context:
space:
mode:
authoradnano <[email protected]>2020-10-12 00:13:24 -0400
committeradnano <[email protected]>2020-10-12 00:13:24 -0400
commit3e640c384362738d37c40727a8e3a118b4b7bb54 (patch)
tree2115cd950dd9ec17c8161dbbc3f67ca8eab61c80 /cert.go
parentImplement loading of certificates from a directory (diff)
downloadgo-gemini-3e640c384362738d37c40727a8e3a118b4b7bb54.tar.xz
go-gemini-3e640c384362738d37c40727a8e3a118b4b7bb54.zip
Update examples
Diffstat (limited to 'cert.go')
-rw-r--r--cert.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/cert.go b/cert.go
index 1f092a3..94ad90a 100644
--- a/cert.go
+++ b/cert.go
@@ -60,7 +60,7 @@ func (c *CertificateStore) Load(path string) error {
if err != nil {
continue
}
- hostname := filepath.Base(crtPath)
+ hostname := strings.TrimSuffix(filepath.Base(crtPath), ".crt")
c.store[hostname] = cert
}
return nil