<commit_before><commit_msg>First commit<commit_after>package Validate

import "fmt"

//Defigning a vlidate function which return a isValid and message
type  Validate func(value string) (message string, isValid bool)

//Accept as value from clid and validate func which must return true to proceed..
/*
    Example
    GetInput(&id, "Enter user Id: ", func(value string)(message string, isValid bool){
	return "User Id must be a number", IsNumeric(id)

    })
 */
func GetInput(value *string, message string,  validFn Validate){
	isValid := false
	var validMsg string
	for !isValid{
		fmt.Println(message)
		fmt.Scanln(value)
		validMsg, isValid = validFn(*value)
		if !isValid{
			fmt.Println(validMsg)
		}
	}
}
{'fraction_non_alphanumeric': 0.10126582278481013, 'fraction_numerical': 0.0, 'mean_word_length': 4.313432835820896, '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': '1139845', 'n_tokens_mistral': 228, 'n_tokens_neox': 226, 'n_words': 77}