func setCheckValidRepos(check voucher.Check, validRepos []string) {
	if validRepoCheck, ok := check.(voucher.RepoValidatorCheck); ok {
		validRepoCheck.SetValidRepos(validRepos)
	}
}
setCheckValidRepos sets the valid repos list for the passed Check, if
that Check is a RepoValidatorCheck.
package config
import (
	"fmt"
	voucher "github.com/grafeas/voucher/v2"
	"github.com/grafeas/voucher/v2/repository"
	"github.com/spf13/viper"
	_ "github.com/grafeas/voucher/v2/checks/diy"
	_ "github.com/grafeas/voucher/v2/checks/nobody"
	_ "github.com/grafeas/voucher/v2/checks/provenance"
	_ "github.com/grafeas/voucher/v2/checks/snakeoil"
	_ "github.com/grafeas/voucher/v2/checks/approved"
)
func setCheckAuth(check voucher.Check, auth voucher.Auth) {
	if authCheck, ok := check.(voucher.AuthorizedCheck); ok {
		authCheck.SetAuth(auth)
	}
}
func setCheckScanner(check voucher.Check, scanner voucher.VulnerabilityScanner) {
	if vulCheck, ok := check.(voucher.VulnerabilityCheck); ok {
		vulCheck.SetScanner(scanner)
	}
}
func setCheckMetadataClient(check voucher.Check, metadataClient voucher.MetadataClient) {
	if metadataCheck, ok := check.(voucher.MetadataCheck); ok {
		metadataCheck.SetMetadataClient(metadataClient)
	}
}