Starting the Notify Package
Unlike other applications you developed, notify won’t be an executable application. It will be a library that allows you to include system notifications in other applications. You’ll develop a naive but functional implementation that uses the os/exec package to call external programs that send a system notification. Because notifications vary according to the operating system, this is a practical example of how to use operating system--specific data and files in your applications. You’ll provide support for three operating systems: Linux, macOS, and Windows.
To use this package, you need these tools installed on your system, according to your operating system:
- Linux:
-
notify-send: Included as part of libnotify.[75] ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access