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: plugin_path.go
    path of file: ./repos/steampipe/pkg/filepaths
    
    the code of the file until where you have to start completion: package filepaths

import (
	"fmt"
	"log"
	"os"
	"path/filepath"

	"github.com/turbot/steampi
    
func FindPluginFolder(remoteSchema string) (string, error) {
	pluginDir := EnsurePluginDir()

	// first try searching by prefix - trim the schema name
	globPattern := filepath.Join(pluginDir, utils.TrimSchemaName(remoteSchema)) + "*"
	matches, err := filepath.Glob(globPattern)
	if err != nil {
		return "", err
	}
	// there was no match
	if len(matches) == 0 {
		return "", sperr.WrapWithMessage(os.ErrNotExist, "no plugin installed matching %s", remoteSchema)
	}

	// we found a match
	if len(matches) == 1 {
		return matches[0], nil
	}

	// when there are multiple matches,
	// find the first match which has the same hashed name as the schema
	for _, match := range matches {
		// get the relative path to this match from the plugin folder
		folderRelativePath, err := filepath.Rel(pluginDir, match)
		if err != nil {
			// do not fail on error here
			continue
		}
		hashedName := utils.PluginFQNToSchemaName(folderRelativePath)
		if hashedName == remoteSchema {
			return filepath.Join(pluginDir, folderRelativePath), nil
		}
	}

	return "", nil
}