Rename InfoImporter -> LegacyInfoImporter (#8739)

Avoid namespace clash with the InfoImporter interface
that already exists in the v0.41 release series.
This commit is contained in:
Alessio Treglia 2021-03-01 20:09:01 +00:00 committed by GitHub
parent 1c6e267964
commit 010eeef457
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 3 deletions

View File

@ -111,7 +111,7 @@ func runMigrateCmd(cmd *cobra.Command, args []string) error {
// TypeLocal needs an additional step to ask password.
// The other keyring types are handled by ImportInfo.
if keyType != keyring.TypeLocal {
infoImporter, ok := migrator.(keyring.InfoImporter)
infoImporter, ok := migrator.(keyring.LegacyInfoImporter)
if !ok {
return fmt.Errorf("the Keyring implementation does not support import operations of Info types")
}

View File

@ -116,8 +116,8 @@ type Importer interface {
ImportPubKey(uid string, armor string) error
}
// InfoImporter is implemented by key stores that support import of Info types.
type InfoImporter interface {
// LegacyInfoImporter is implemented by key stores that support import of Info types.
type LegacyInfoImporter interface {
// ImportInfo import a keyring.Info into the current keyring.
// It is used to migrate multisig, ledger, and public key Info structure.
ImportInfo(oldInfo Info) error