don't confuse autocert
This commit is contained in:
parent
8ad2a641f1
commit
316daa1eda
|
@ -1,6 +1,7 @@
|
|||
package database
|
||||
|
||||
import (
|
||||
"github.com/asdine/storm"
|
||||
"golang.org/x/crypto/acme/autocert"
|
||||
"golang.org/x/net/context"
|
||||
)
|
||||
|
@ -34,7 +35,16 @@ type storageManager struct {
|
|||
}
|
||||
|
||||
func (s *storageManager) Get(ctx context.Context, key string) ([]byte, error) {
|
||||
return s.GetCert(ctx, key)
|
||||
data, err := s.GetCert(ctx, key)
|
||||
if err != nil {
|
||||
if err == storm.ErrNotFound {
|
||||
return nil, autocert.ErrCacheMiss
|
||||
} else {
|
||||
return nil, err
|
||||
}
|
||||
}
|
||||
|
||||
return data, nil
|
||||
}
|
||||
|
||||
func (s *storageManager) Put(ctx context.Context, key string, data []byte) error {
|
||||
|
|
Loading…
Reference in New Issue