From 0c88fb544734d07a2d61e87b9084ee6fdc274cff Mon Sep 17 00:00:00 2001 From: Jan Dittberner Date: Sun, 16 Jan 2022 14:07:00 +0100 Subject: [PATCH] Fix useless err parameter --- cmd/registration.go | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/cmd/registration.go b/cmd/registration.go index cabeb9e..84f5a9e 100644 --- a/cmd/registration.go +++ b/cmd/registration.go @@ -61,7 +61,7 @@ func main() { log.Fatalf("error loading configuration: %v", err) } - sessionPath, sessionAuthKey, sessionEncKey := configureSessionParameters(config, err) + sessionPath, sessionAuthKey, sessionEncKey := configureSessionParameters(config) services.InitSessionStore(logger, sessionPath, sessionAuthKey, sessionEncKey) tlsClientConfig := &tls.Config{ @@ -83,6 +83,9 @@ func main() { services.AddMessages(ctx) adminURL, err := url.Parse(config.MustString("hydra.admin.url")) + if err != nil { + log.Panicf("could not parse Hydra admin URL: %v", err) + } tlsClientTransport := &http.Transport{TLSClientConfig: tlsClientConfig} httpClient := &http.Client{Transport: tlsClientTransport} adminClient := hydra.New(openapiClient.NewWithClient( @@ -138,7 +141,7 @@ func main() { startServer(ctx, handlerChain, logger, config) } -func configureSessionParameters(config *koanf.Koanf, err error) (string, []byte, []byte) { +func configureSessionParameters(config *koanf.Koanf) (string, []byte, []byte) { sessionPath := config.MustString("session.path") sessionAuthKey, err := base64.StdEncoding.DecodeString(config.String("session.auth-key")) if err != nil {