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

Function main

chapter5/listing56/listing56.go:35–49  ·  view source on GitHub ↗

main is the entry point for the application.

()

Source from the content-addressed store, hash-verified

33
34// main is the entry point for the application.
35func main() {
36 // Create an admin user.
37 ad := admin{
38 user: user{
39 name: "john smith",
40 email: "john@yahoo.com",
41 },
42 level: "super",
43 }
44
45 // Send the admin user a notification.
46 // The embedded inner type's implementation of the
47 // interface is "promoted" to the outer type.
48 sendNotification(&ad)
49}
50
51// sendNotification accepts values that implement the notifier
52// interface and sends notifications.

Callers

nothing calls this directly

Calls 1

sendNotificationFunction · 0.70

Tested by

no test coverage detected