Created
August 17, 2017 10:33
-
-
Save fonglh/0db7520b17c075aee2d6a0802115cf9f to your computer and use it in GitHub Desktop.
Main function of random email generator
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
func main() { | |
rand.Seed(time.Now().UTC().UnixNano()) | |
output, _ := os.Create("generated_names.txt") | |
defer output.Close() | |
for i := 0; i < 200; i++ { | |
name := GetRandomName(0) | |
email := fmt.Sprintf("%s@%s\n", name, domains[rand.Intn(len(domains))]) | |
output.Write([]byte(email)) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment