fix: golangci-lint and gosec warnings

This commit is contained in:
2021-05-16 23:02:46 +02:00
parent f7bb283784
commit ffbc8a793c
22 changed files with 228 additions and 157 deletions

View File

@ -6,6 +6,7 @@ import (
"net/url"
"os"
"os/signal"
"syscall"
"git.cryptic.systems/volker.raschek/flucky/pkg/config"
"git.cryptic.systems/volker.raschek/flucky/pkg/repository"
@ -15,7 +16,6 @@ import (
)
func Start(cnf *config.Config, cachedEntries uint, flogger logger.Logger) error {
// load data source name (dsn)
dsnURL, err := url.Parse(cnf.DSN)
if err != nil {
@ -79,7 +79,7 @@ func Start(cnf *config.Config, cachedEntries uint, flogger logger.Logger) error
}
interruptChannel := make(chan os.Signal, 1)
signal.Notify(interruptChannel, os.Interrupt, os.Kill)
signal.Notify(interruptChannel, syscall.SIGTERM)
// Collection
parentCtx := context.Background()