mirror of
https://github.com/gopasspw/gopass.git
synced 2026-05-30 11:18:48 +02:00
16c071a780
Signed-off-by: Dominik Schulz <dominik.schulz@gauner.org>
23 lines
399 B
Go
23 lines
399 B
Go
package leaf
|
|
|
|
import (
|
|
"context"
|
|
"fmt"
|
|
|
|
"github.com/gopasspw/gopass/internal/backend"
|
|
"github.com/gopasspw/gopass/pkg/ctxutil"
|
|
)
|
|
|
|
func (s *Store) initStorageBackend(ctx context.Context) error {
|
|
ctx = ctxutil.WithAlias(ctx, s.alias)
|
|
|
|
store, err := backend.DetectStorage(ctx, s.path)
|
|
if err != nil {
|
|
return fmt.Errorf("unknown storage backend: %w", err)
|
|
}
|
|
|
|
s.storage = store
|
|
|
|
return nil
|
|
}
|