Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to send system notifications for windows in golang

I want to send a system notifications to windows using golang.

How can this be done? if you awnser contains a cross platform solution it would be even better.

like image 243
Mister Verleg Avatar asked Sep 28 '16 12:09

Mister Verleg


1 Answers

I'm assuming you are looking for desktop notifications. There are a few different libraries that can do this for you. Originally I found this with a simple Google search

Link / Dependency URL: github.com/0xAX/notificator

Here is the example on their README.md page:

package main

import (
  "github.com/0xAX/notificator"
)

var notify *notificator.Notificator

func main() {

  notify = notificator.New(notificator.Options{
    DefaultIcon: "icon/default.png",
    AppName:     "My test App",
  })

  notify.Push("title", "text", "/home/user/icon.png", notificator.UR_CRITICAL)
}
like image 137
tier1 Avatar answered Sep 18 '22 23:09

tier1