notify
notify copied to clipboard
V1 plan
Might as well make a v1 release after 9 years.
v1 releases usually plays nicer with go modules anyway.
Plan:
V1 TODO
- [ ] delete deprecated
notify.Variant - [ ] all hint helpers must start with
Hint.* - [ ] adhere to: "accept interfaces, return concrete types"
- [ ] delete the big
Notifierinterface - [ ] return
*Notifieras the concrete type
- [ ] delete the big
- [ ] make all functions consistently use a *Notification pointer, so we can use fluent apis when creating a notification, something like:
n := newBaseNotification().
SetUrgency(UrgencyLow).
AddHint(HintImageData(myImage)).
AddHint(HintSoundName("new-message))
notifier.Send(n)
This is not possible today, because the Send() method takes a value object
Great news indeed because this package is useful and practical.
My program makes a wrapper around your package and uses a fluent API.
BTW, I noticed you updated the package very recently.
- I modified my wrapper to use your urgency hints and now the urgency notifications finally appear colored (as per server configuration). I haven't looked at the changes you made in the library, just the example.
- I changed my wrapper to connect/disconnect on each notification and now I can individually close them.