Skip to content

Commit

Permalink
exercise-2: read mody text
Browse files Browse the repository at this point in the history
Signed-off-by: soypete <petersonmiriah@gmail.com>
  • Loading branch information
Soypete committed Jan 22, 2024
1 parent 0768345 commit a58f6c6
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions exercise-2/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

Expand Down
4 changes: 2 additions & 2 deletions exercise-2/solution/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

Expand Down

0 comments on commit a58f6c6

Please sign in to comment.