Skip to content

Commit

Permalink
lint fix
Browse files Browse the repository at this point in the history
  • Loading branch information
raynaudoe committed Aug 30, 2024
1 parent b438d03 commit 1dd410a
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 16 deletions.
29 changes: 14 additions & 15 deletions pkg/keyring/keyring.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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{}
Expand Down Expand Up @@ -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) {
Expand Down
1 change: 0 additions & 1 deletion pkg/provider/file/provider.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ const (
type FileProvider struct {
filePath string
metadata components.ProviderMetadata
signer components.Signer
}

var _ components.CryptoProvider = &FileProvider{}
Expand Down

0 comments on commit 1dd410a

Please sign in to comment.