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

Function main

chapter7/patterns/search/main/main.go:13–38  ·  view source on GitHub ↗

main is the entry point for all Go programs.

()

Source from the content-addressed store, hash-verified

11
12// main is the entry point for all Go programs.
13func main() {
14 // Submit the search and display the results.
15 results := search.Submit(
16 "golang",
17 search.OnlyFirst,
18 search.Google,
19 search.Bing,
20 search.Yahoo,
21 )
22
23 for _, result := range results {
24 log.Printf("main : Results : Info : %+v\n", result)
25 }
26
27 // This time we want to wait for all the results.
28 results = search.Submit(
29 "golang",
30 search.Google,
31 search.Bing,
32 search.Yahoo,
33 )
34
35 for _, result := range results {
36 log.Printf("main : Results : Info : %+v\n", result)
37 }
38}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected