mirror of
https://github.com/optim-enterprises-bv/vault.git
synced 2025-11-02 03:27:54 +00:00
Fix a few vet warnings (#5674)
This commit is contained in:
@@ -184,6 +184,7 @@ func (c *OperatorMigrateCommand) migrate(config *migratorConfig) error {
|
|||||||
|
|
||||||
select {
|
select {
|
||||||
case err := <-doneCh:
|
case err := <-doneCh:
|
||||||
|
cancelFunc()
|
||||||
return err
|
return err
|
||||||
case <-c.ShutdownCh:
|
case <-c.ShutdownCh:
|
||||||
c.UI.Output("==> Migration shutdown triggered\n")
|
c.UI.Output("==> Migration shutdown triggered\n")
|
||||||
@@ -191,7 +192,6 @@ func (c *OperatorMigrateCommand) migrate(config *migratorConfig) error {
|
|||||||
<-doneCh
|
<-doneCh
|
||||||
return errAbort
|
return errAbort
|
||||||
}
|
}
|
||||||
return nil
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// migrateAll copies all keys in lexicographic order.
|
// migrateAll copies all keys in lexicographic order.
|
||||||
|
|||||||
@@ -1842,7 +1842,6 @@ func (c *ServerCommand) storageMigrationActive(backend physical.Backend) bool {
|
|||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return false
|
|
||||||
}
|
}
|
||||||
|
|
||||||
type StorageMigrationStatus struct {
|
type StorageMigrationStatus struct {
|
||||||
|
|||||||
@@ -905,8 +905,6 @@ func (ts *TokenStore) create(ctx context.Context, entry *logical.TokenEntry) err
|
|||||||
default:
|
default:
|
||||||
return fmt.Errorf("cannot create a token of type %d", entry.Type)
|
return fmt.Errorf("cannot create a token of type %d", entry.Type)
|
||||||
}
|
}
|
||||||
|
|
||||||
return errors.New("unreachable code")
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Store is used to store an updated token entry without writing the
|
// Store is used to store an updated token entry without writing the
|
||||||
|
|||||||
Reference in New Issue
Block a user