Suppose you want to create a Notifier interface; it should implement the SendNotification() method that sends a string with a message to a certain email.
We've already created the Notification struct for you. Your task is to create the SendNotification() method and the Notifier interface.
To make the Notifier interface work as intended, the program should take as an input an email, to which it will send the notification, and also the msg that the notification will contain. Finally, it should print the notification in the following format:
Sending notification to [email protected] with message msg
This problem uses the
bufio and os packages to read a whitespace-separated string from the input. To solve this task, you don't need to know how the bufio/os packages work; your only objective is to create the SendNotification() method and the Notifier interface.