code: func GeneratePasswordCharsetCheck(length int, chars string) string {
  	validator := crunchy.NewValidator()
  	var password string
  
  	for i := 0; i < 3; i++ {
  		pw := &bytes.Buffer{}
  		for pw.Len() < length {
  			_ = pw.WriteByte(chars[randomInteger(len(chars))])
  		}
  		password = pw.String()
  
  		if validator.Check(password) == nil {
  			break
  		}
  	}
  
  	return password
  }
docs: // GeneratePasswordCharsetCheck generates a random password from a given
  // set of characters and validates the generated password with crunchy