Fix useless err parameter

This commit is contained in:
Jan Dittberner 2022-01-16 14:07:00 +01:00 committed by Jan Dittberner
parent 3a2c33be85
commit 0c88fb5447

View file

@ -61,7 +61,7 @@ func main() {
log.Fatalf("error loading configuration: %v", err) log.Fatalf("error loading configuration: %v", err)
} }
sessionPath, sessionAuthKey, sessionEncKey := configureSessionParameters(config, err) sessionPath, sessionAuthKey, sessionEncKey := configureSessionParameters(config)
services.InitSessionStore(logger, sessionPath, sessionAuthKey, sessionEncKey) services.InitSessionStore(logger, sessionPath, sessionAuthKey, sessionEncKey)
tlsClientConfig := &tls.Config{ tlsClientConfig := &tls.Config{
@ -83,6 +83,9 @@ func main() {
services.AddMessages(ctx) services.AddMessages(ctx)
adminURL, err := url.Parse(config.MustString("hydra.admin.url")) 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} tlsClientTransport := &http.Transport{TLSClientConfig: tlsClientConfig}
httpClient := &http.Client{Transport: tlsClientTransport} httpClient := &http.Client{Transport: tlsClientTransport}
adminClient := hydra.New(openapiClient.NewWithClient( adminClient := hydra.New(openapiClient.NewWithClient(
@ -138,7 +141,7 @@ func main() {
startServer(ctx, handlerChain, logger, config) 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") sessionPath := config.MustString("session.path")
sessionAuthKey, err := base64.StdEncoding.DecodeString(config.String("session.auth-key")) sessionAuthKey, err := base64.StdEncoding.DecodeString(config.String("session.auth-key"))
if err != nil { if err != nil {