<commit_before>package main

import "fmt"
import "gofizzbuzz/game"

func main() {
	for index := 1; index <= 100; index++ {
		fmt.Println(game.Play(index))
	}
}<commit_msg>leverage go routines and channels for main loop<commit_after>package main

import (
	"fmt"
	"gofizzbuzz/game"
	"runtime"
)

func main() {
	runtime.GOMAXPROCS(8)

	gameResults := make(chan string)
	complete := make(chan bool)

	go play1to100(gameResults)
	go printer(gameResults, complete)

	<-complete
}

func play1to100(gameResults chan string) {
	for index := 1; index <= 100; index++ {
		gameResults <- game.Play(index)
	}

	close(gameResults)
}

func printer(gameResults chan string, complete chan bool) {
	for result := range gameResults {
		fmt.Println(result)
	}

	complete <- true
}
{'fraction_non_alphanumeric': 0.12746386333771353, 'fraction_numerical': 0.022339027595269383, 'mean_word_length': 4.521739130434782, 'pattern_counts': {'":': 0, '<': 8, '<?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': '6727473', 'n_tokens_mistral': 295, 'n_tokens_neox': 267, 'n_words': 70}