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

Function main

chapter5/listing36/listing36.go:28–38  ·  view source on GitHub ↗

main is the entry point for the application.

()

Source from the content-addressed store, hash-verified

26
27// main is the entry point for the application.
28func main() {
29 // Create a value of type User and send a notification.
30 u := user{"Bill", "bill@email.com"}
31
32 sendNotification(u)
33
34 // ./listing36.go:32: cannot use u (type user) as type
35 // notifier in argument to sendNotification:
36 // user does not implement notifier
37 // (notify method has pointer receiver)
38}
39
40// sendNotification accepts values that implement the notifier
41// interface and sends notifications.

Callers

nothing calls this directly

Calls 1

sendNotificationFunction · 0.70

Tested by

no test coverage detected