MCPcopy Create free account
hub / github.com/goinaction/code / main

Function main

chapter1/channels/hellochannels.go:18–30  ·  view source on GitHub ↗

main is the entry point for the program.

()

Source from the content-addressed store, hash-verified

16
17// main is the entry point for the program.
18func main() {
19 c := make(chan int)
20 go printer(c)
21 wg.Add(1)
22
23 // Send 10 integers on the channel.
24 for i := 1; i <= 10; i++ {
25 c <- i
26 }
27
28 close(c)
29 wg.Wait()
30}

Callers

nothing calls this directly

Calls 2

printerFunction · 0.85
AddMethod · 0.80

Tested by

no test coverage detected