1
0
Fork 0
mirror of https://git.sr.ht/~adnano/go-gemini synced 2024-04-27 00:15:14 +02:00

certificate.Store: Mention GetCertificate usage

This commit is contained in:
Adnan Maolood 2021-02-23 09:10:19 -05:00
parent 8190e819e8
commit 32f40523ed

View File

@ -77,6 +77,8 @@ func (s *Store) Add(scope string, cert tls.Certificate) error {
// Get retrieves a certificate for the given hostname.
// If no matching scope has been registered, Get returns an error.
// Get generates new certificates as needed and rotates expired certificates.
//
// Get is suitable for use in a gemini.Server's GetCertificate field.
func (s *Store) Get(hostname string) (*tls.Certificate, error) {
s.mu.RLock()
defer s.mu.RUnlock()