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

import (
	"errors"
	"fmt"

	"github.com/bmatcuk/doublestar/v2"

	"github.com/anchore/syft/syft/file"
	"github.com/anchore/syft/syft/sbom"
)

var errDoesNotProvide = fmt.Errorf("cannot provide packages from the given source")

// Provide a set of packages and context metadata describing where they were sourced from.
func Provide
    
func Provide(userInput string, config ProviderConfig) ([]Package, Context, *sbom.SBOM, error) {
	packages, ctx, s, err := syftSBOMProvider(userInput, config)
	if !errors.Is(err, errDoesNotProvide) {
		if len(config.Exclusions) > 0 {
			var exclusionsErr error
			packages, exclusionsErr = filterPackageExclusions(packages, config.Exclusions)
			if exclusionsErr != nil {
				return nil, ctx, s, exclusionsErr
			}
		}
		return packages, ctx, s, err
	}

	packages, err = purlProvider(userInput)
	if !errors.Is(err, errDoesNotProvide) {
		return packages, Context{}, s, err
	}

	return syftProvider(userInput, config)
}