From 7443eb9caa35606666a77f070f4bbdc4f2903b3b Mon Sep 17 00:00:00 2001 From: Fernandez Ludovic Date: Sat, 24 Jan 2026 23:30:06 +0100 Subject: [PATCH] refactor: use homogeneous parameter names --- cmd/setup.go | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/cmd/setup.go b/cmd/setup.go index 0613339b4..025265383 100644 --- a/cmd/setup.go +++ b/cmd/setup.go @@ -15,7 +15,6 @@ import ( "github.com/go-acme/lego/v5/acme" "github.com/go-acme/lego/v5/certcrypto" - "github.com/go-acme/lego/v5/cmd/internal/storage" "github.com/go-acme/lego/v5/lego" "github.com/go-acme/lego/v5/log" "github.com/go-acme/lego/v5/registration" @@ -24,7 +23,7 @@ import ( ) // setupClient creates a new client with challenge settings. -func setupClient(cmd *cli.Command, account *storage.Account, keyType certcrypto.KeyType) (*lego.Client, error) { +func setupClient(cmd *cli.Command, account registration.User, keyType certcrypto.KeyType) (*lego.Client, error) { client, err := newClient(cmd, account, keyType) if err != nil { return nil, fmt.Errorf("new client: %w", err) @@ -35,8 +34,8 @@ func setupClient(cmd *cli.Command, account *storage.Account, keyType certcrypto. return client, nil } -func newClient(cmd *cli.Command, acc registration.User, keyType certcrypto.KeyType) (*lego.Client, error) { - client, err := lego.NewClient(newClientConfig(cmd, acc, keyType)) +func newClient(cmd *cli.Command, account registration.User, keyType certcrypto.KeyType) (*lego.Client, error) { + client, err := lego.NewClient(newClientConfig(cmd, account, keyType)) if err != nil { return nil, fmt.Errorf("new client: %w", err) } @@ -48,8 +47,8 @@ func newClient(cmd *cli.Command, acc registration.User, keyType certcrypto.KeyTy return client, nil } -func newClientConfig(cmd *cli.Command, acc registration.User, keyType certcrypto.KeyType) *lego.Config { - config := lego.NewConfig(acc) +func newClientConfig(cmd *cli.Command, account registration.User, keyType certcrypto.KeyType) *lego.Config { + config := lego.NewConfig(account) config.CADirURL = cmd.String(flgServer) config.Certificate = lego.CertificateConfig{