<commit_before>package downloaders

import (
	"strings"

	"code.cloudfoundry.org/lager"
	"github.com/snickers/snickers/db"
)

// DownloadFunc is a function type for the multiple
// possible ways to download the source file
type DownloadFunc func(logger lager.Logger, configPath string, dbInstance db.Storage, jobID string) error

// GetDownloadFunc returns the download function
// based on the job source.
func GetDownloadFunc(jobSource string) DownloadFunc {
	if strings.Contains(jobSource, "amazonaws") {
		return S3Download
	} else if strings.Contains(jobSource, "ftp://") {
		return FTPDownload
	}
<commit_msg>downloaders: use HasPrefix instead of Contains on GetDownloadFunc<commit_after>package downloaders

import (
	"strings"

	"code.cloudfoundry.org/lager"
	"github.com/snickers/snickers/db"
)

// DownloadFunc is a function type for the multiple
// possible ways to download the source file
type DownloadFunc func(logger lager.Logger, configPath string, dbInstance db.Storage, jobID string) error

// GetDownloadFunc returns the download function
// based on the job source.
func GetDownloadFunc(jobSource string) DownloadFunc {
	if strings.Contains(jobSource, "amazonaws") {
		return S3Download
	} else if strings.HasPrefix(jobSource, "ftp://") {
		return FTPDownload
	}

{'fraction_non_alphanumeric': 0.08807482462977397, 'fraction_numerical': 0.001558846453624318, 'mean_word_length': 4.944444444444445, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 22, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4860004', 'n_tokens_mistral': 381, 'n_tokens_neox': 372, 'n_words': 121}