main is the entry point for the application.
()
| 26 | |
| 27 | // main is the entry point for the application. |
| 28 | func 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. |
nothing calls this directly
no test coverage detected