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

Function init

chapter6/listing24/listing24.go:23–26  ·  view source on GitHub ↗

init is called to initialize the package by the Go runtime prior to any other code being executed.

()

Source from the content-addressed store, hash-verified

21// init is called to initialize the package by the
22// Go runtime prior to any other code being executed.
23func init() {
24 // Seed the random number generator.
25 rand.Seed(time.Now().Unix())
26}
27
28// main is the entry point for all Go programs.
29func main() {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected