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

Function main

chapter5/listing35/listing35.go:13–24  ·  view source on GitHub ↗

main is the entry point for the application.

()

Source from the content-addressed store, hash-verified

11
12// main is the entry point for the application.
13func main() {
14 var b bytes.Buffer
15
16 // Write a string to the buffer.
17 b.Write([]byte("Hello"))
18
19 // Use Fprintf to concatenate a string to the Buffer.
20 fmt.Fprintf(&b, "World!")
21
22 // Write the content of the Buffer to stdout.
23 io.Copy(os.Stdout, &b)
24}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected