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

Function init

chapter5/listing34/listing34.go:13–18  ·  view source on GitHub ↗

init is called before main.

()

Source from the content-addressed store, hash-verified

11
12// init is called before main.
13func init() {
14 if len(os.Args) != 2 {
15 fmt.Println("Usage: ./example2 <url>")
16 os.Exit(-1)
17 }
18}
19
20// main is the entry point for the application.
21func main() {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected