Files
Dominik Schulz 16c071a780 Enable golangci-lint on push and pr (#2158)
Signed-off-by: Dominik Schulz <dominik.schulz@gauner.org>
2022-03-24 21:58:53 +01:00

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
}