From dfdc9c06ed49c5279330fca19d173a377a085f06 Mon Sep 17 00:00:00 2001 From: Mariano Cano Date: Thu, 7 Apr 2022 18:33:13 -0700 Subject: [PATCH] Fix linter error importShadow --- authority/linkedca.go | 6 +++--- authority/provisioners.go | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/authority/linkedca.go b/authority/linkedca.go index 1b920ce8..29201164 100644 --- a/authority/linkedca.go +++ b/authority/linkedca.go @@ -246,14 +246,14 @@ func (c *linkedCaClient) GetCertificateData(serial string) (*db.CertificateData, return nil, err } - var provisioner *db.ProvisionerData + var pd *db.ProvisionerData if p := resp.Provisioner; p != nil { - provisioner = &db.ProvisionerData{ + pd = &db.ProvisionerData{ ID: p.Id, Name: p.Name, Type: p.Type.String(), } } return &db.CertificateData{ - Provisioner: provisioner, + Provisioner: pd, }, nil } diff --git a/authority/provisioners.go b/authority/provisioners.go index 3713705f..0dab24b9 100644 --- a/authority/provisioners.go +++ b/authority/provisioners.go @@ -275,7 +275,7 @@ func (a *Authority) RemoveProvisioner(ctx context.Context, id string) error { // CreateFirstProvisioner creates and stores the first provisioner when using // admin database provisioner storage. -func CreateFirstProvisioner(ctx context.Context, db admin.DB, password string) (*linkedca.Provisioner, error) { +func CreateFirstProvisioner(ctx context.Context, adminDB admin.DB, password string) (*linkedca.Provisioner, error) { if password == "" { pass, err := ui.PromptPasswordGenerate("Please enter the password to encrypt your first provisioner, leave empty and we'll generate one") if err != nil { @@ -318,7 +318,7 @@ func CreateFirstProvisioner(ctx context.Context, db admin.DB, password string) ( }, }, } - if err := db.CreateProvisioner(ctx, p); err != nil { + if err := adminDB.CreateProvisioner(ctx, p); err != nil { return nil, admin.WrapErrorISE(err, "error creating provisioner") } return p, nil