You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: fsck.go
    path of file: ./repos/teller/vendor/github.com/gopasspw/gopass/internal/store/root
    
    the code of the file until where you have to start completion: package root

import (
	"context"
	"strings"

	"github.com/gopasspw/gopass/interna
    
func (s *Store) Fsck(ctx context.Context, path string) error {
	var result error

	for alias, sub := range s.mounts {
		if sub == nil {
			continue
		}

		if path != "" && !strings.HasPrefix(path, alias+"/") {
			continue
		}

		path = strings.TrimPrefix(path, alias+"/")

		// check sub store
		debug.Log("Checking %s", alias)

		if err := sub.Fsck(ctx, path); err != nil {
			out.Errorf(ctx, "fsck failed on sub store %s: %s", alias, err)
			result = multierror.Append(result, err)
		}

		debug.Log("Checked %s", alias)
	}

	// check root store
	if err := s.store.Fsck(ctx, path); err != nil {
		out.Errorf(ctx, "fsck failed on root store: %s", err)
		result = multierror.Append(result, err)
	}

	debug.Log("Checked root store")

	return result
}