From 1dd410a55e1940d298d50de3685d4f69defeac86 Mon Sep 17 00:00:00 2001 From: Ezequiel Raynaudo Date: Fri, 30 Aug 2024 09:05:09 -0300 Subject: [PATCH] lint fix --- pkg/keyring/keyring.go | 29 ++++++++++++++--------------- pkg/provider/file/provider.go | 1 - 2 files changed, 14 insertions(+), 16 deletions(-) diff --git a/pkg/keyring/keyring.go b/pkg/keyring/keyring.go index 6bcb0c2..6567d6d 100644 --- a/pkg/keyring/keyring.go +++ b/pkg/keyring/keyring.go @@ -4,9 +4,10 @@ import ( "crypto-provider/pkg/keyring/internal" "errors" "fmt" - "github.com/99designs/keyring" "io" "os" + + "github.com/99designs/keyring" ) // Backend options for Keyring @@ -17,11 +18,9 @@ const ( BackendMemory = "memory" ) -const ( - keyringFileDirName = "keyring-file" - keyringTestDirName = "keyring-test" - passKeyringPrefix = "keyring-%s" -) +// const keyringFileDirName = "keyring-file" +// const keyringTestDirName = "keyring-test" +// const passKeyringPrefix = "cloudproxy" var ( _ Keyring = &keystore{} @@ -171,15 +170,15 @@ func newTestBackendKeyringConfig(appName, dir string) keyring.Config { } // newPassBackendKeyringConfig creates a new pass backend keyring configuration. -func newPassBackendKeyringConfig(appName, _ string, _ io.Reader) (keyring.Config, error) { - prefix := fmt.Sprintf(passKeyringPrefix, appName) - - return keyring.Config{ - AllowedBackends: []keyring.BackendType{keyring.PassBackend}, - ServiceName: appName, - PassPrefix: prefix, - }, nil -} +// func newPassBackendKeyringConfig(appName, dir string) keyring.Config { +// prefix := fmt.Sprintf(passKeyringPrefix, appName) + +// return keyring.Config{ +// AllowedBackends: []keyring.BackendType{keyring.PassBackend}, +// ServiceName: appName, +// PassPrefix: prefix, +// } +// } // newFileBackendKeyringConfig creates a new file backend keyring configuration. func newFileBackendKeyringConfig(name, dir string, buf io.Reader) (keyring.Config, error) { diff --git a/pkg/provider/file/provider.go b/pkg/provider/file/provider.go index 651c8ab..e407c18 100644 --- a/pkg/provider/file/provider.go +++ b/pkg/provider/file/provider.go @@ -15,7 +15,6 @@ const ( type FileProvider struct { filePath string metadata components.ProviderMetadata - signer components.Signer } var _ components.CryptoProvider = &FileProvider{}