fix lint issue

This commit is contained in:
6543 2022-03-27 19:48:34 +02:00
parent 9629df54b2
commit 29e147d5c3
2 changed files with 3 additions and 15 deletions

View file

@ -11,7 +11,7 @@ pipeline:
- go version
- go install mvdan.cc/gofumpt@latest
- "[ $(gofumpt -extra -l . | wc -l) != 0 ] && { echo 'code not formated'; exit 1; }"
- golangci-lint run -v
- golangci-lint run
# # TODO: make tests work
# test:

View file

@ -13,6 +13,8 @@ import (
"github.com/rs/zerolog/log"
)
var _ CertDB = aDB{}
type aDB struct {
ctx context.Context
cancel context.CancelFunc
@ -76,20 +78,6 @@ func (p aDB) sync() {
}
}
func (p aDB) compact() {
for {
err := p.intern.Sync()
if err != nil {
log.Err(err).Msg("Syncing cert database failed")
}
select {
case <-p.ctx.Done():
return
case <-time.After(p.syncInterval):
}
}
}
func New(path string) (CertDB, error) {
if path == "" {
return nil, fmt.Errorf("path not set")