diff --git a/exercise-2/main.go b/exercise-2/main.go index 77acb65..7d1ff14 100644 --- a/exercise-2/main.go +++ b/exercise-2/main.go @@ -30,8 +30,8 @@ func (wp *workerPool) run() int { // getMessages gets a slice of messages to process func getMessages() []string { - // file, _ := os.ReadFile("datums/melville-moby_dick.txt") - words := strings.Split("We dont want to overload io threads and the runtime while we are benchmarking, so we are addings some others words that are not as much but talk about go and other cool software things", " ") + file, _ := os.ReadFile("datums/melville-moby_dick.txt") + words := strings.Split(string(file), " ") return words } diff --git a/exercise-2/solution/main.go b/exercise-2/solution/main.go index fae3be8..096dc48 100644 --- a/exercise-2/solution/main.go +++ b/exercise-2/solution/main.go @@ -44,8 +44,8 @@ func (wp *workerPool) run() int { // getMessages gets a slice of messages to process func getMessages() []string { - // file, _ := os.ReadFile("datums/melville-moby_dick.txt") - words := strings.Split("We dont want to overload io threads and the runtime while we are benchmarking, so we are addings some others words that are not as much but talk about go and other cool software things", " ") + file, _ := os.ReadFile("datums/melville-moby_dick.txt") + words := strings.Split(string(file), " ") return words }