<commit_before>package otp

import "sync"

const (
	TypeTOTP int16 = 1
	TypeHOTP       = 2
)

func ValidType(t int16) bool {
	return (t == TypeTOTP || t == TypeHOTP)
}

type Authenticator struct {
	mux     *sync.RWMutex
	Type    int16
	OTPAuth map[string]OTP
}

func NewAuthenticator(_type int16) (*Authenticator, error) {
	if !ValidType(_type) {
		return nil, ErrType
	}
	return &Authenticator{<commit_msg>fix: otp auth type<commit_after>package otp

import "sync"

const (
	TypeTOTP string = "totp"
	TypeHOTP        = "hotp"
)

func ValidType(t string) bool {
	return (t == TypeTOTP || t == TypeHOTP)
}

type Authenticator struct {
	mux     *sync.RWMutex
	Type    string
	OTPAuth map[string]OTP
}

func NewAuthenticator(_type string) (*Authenticator, error) {
	if !ValidType(_type) {
		return nil, ErrType
	}
	return &Authenticator{
{'fraction_non_alphanumeric': 0.10671462829736211, 'fraction_numerical': 0.011990407673860911, 'mean_word_length': 3.8830409356725144, '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': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '732942', 'n_tokens_mistral': 332, 'n_tokens_neox': 327, 'n_words': 82}