code: func (eg *exampleGenerator) Generate(seen []string) interface{} {
  	// Randomize array length first, since that's from higher level
  	if eg.hasLengthValidation() {
  		return eg.generateValidatedLengthExample(seen)
  	}
  	// Enum should dominate, because the potential "examples" are fixed
  	if eg.hasEnumValidation() {
  		return eg.generateValidatedEnumExample()
  	}
  	// loop until a satisified example is generated
  	hasFormat, hasPattern, hasMinMax := eg.hasFormatValidation(), eg.hasPatternValidation(), eg.hasMinMaxValidation()
  	attempts := 0
  	for attempts < maxAttempts {
  		attempts++
  		var example interface{}
  		// Format comes first, since it initiates the example
  		if hasFormat {
  			example = eg.generateFormatExample()
  		}
  		// now validate with the rest of matchers; if not satisified, redo
  		if hasPattern {
  			if example == nil {
  				example = eg.generateValidatedPatternExample()
  			} else if !eg.checkPatternValidation(example) {
  				continue
  			}
  		}
  		if hasMinMax {
  			if example == nil {
  				example = eg.generateValidatedMinMaxValueExample()
  			} else if !eg.checkMinMaxValueValidation(example) {
  				continue
  			}
  		}
  		if example == nil {
  			example = eg.a.Type.GenerateExample(eg.r, seen)
  		}
  		return example
  	}
  	return eg.a.Type.GenerateExample(eg.r, seen)
  }
docs: // Generate generates a random value based on the given validations.