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