MCPcopy Create free account
hub / github.com/Soypete/Production-Go-Examples / getMessages

Function getMessages

exercise-2/solution/main.go:46–50  ·  view source on GitHub ↗

getMessages gets a slice of messages to process

()

Source from the content-addressed store, hash-verified

44
45// getMessages gets a slice of messages to process
46func getMessages() []string {
47 file, _ := os.ReadFile("datums/melville-moby_dick.txt")
48 words := strings.Split(string(file), " ")
49 return words
50}
51
52// this will block and not close if the len(msgs) is larger than the channel buffer.
53func (wp *workerPool) queueMessages() {

Callers 1

queueMessagesMethod · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected