<commit_before>package socialauth

import (
	"encoding/json"
	"io/ioutil"
	"net/http"
	"strings"
)

// ProviderService is the enum that defines the available providers
type Provider int

const (
	unknown Provider = iota
	// Facebook is the Facebook auth provider
	Facebook Provider = iota
	// Google is the Google auth provider
	Google Provider = iota
)

// ProviderFromName returns the provider from a given name
// Returns unknown if the given string is gibberish
func ProviderFromName(name string) Provider {
	switch strings.ToLower(name) {
	case "facebook":
		return Facebook
	case "google":
		return Google
	default:
		return unknown
	}<commit_msg>No need to repeat type and 'iota' in const section<commit_after>package socialauth

import (
	"encoding/json"
	"io/ioutil"
	"net/http"
	"strings"
)

// ProviderService is the enum that defines the available providers
type Provider int

const (
	unknown   Provider = iota
	Facebook
	Google
)

// ProviderFromName returns the provider from a given name
// Returns unknown if the given string is gibberish
func ProviderFromName(name string) Provider {
	switch strings.ToLower(name) {
	case "facebook":
		return Facebook
	case "google":
		return Google
	default:
		return unknown
	}
{'fraction_non_alphanumeric': 0.07148659626320066, 'fraction_numerical': 0.0, 'mean_word_length': 4.176470588235294, 'pattern_counts': {'":': 4, '<': 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': 6, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5779035', 'n_tokens_mistral': 382, 'n_tokens_neox': 355, 'n_words': 141}