18 lines
500 B
Go
Raw Normal View History

2014-03-04 16:40:35 -08:00
package main
2014-03-12 19:36:31 -07:00
import "github.com/coreos/coreos-cloudinit/third_party/github.com/guelfey/go.dbus"
2014-03-04 16:40:35 -08:00
func main() {
conn, err := dbus.SessionBus()
if err != nil {
panic(err)
}
obj := conn.Object("org.freedesktop.Notifications", "/org/freedesktop/Notifications")
call := obj.Call("org.freedesktop.Notifications.Notify", 0, "", uint32(0),
"", "Test", "This is a test of the DBus bindings for go.", []string{},
map[string]dbus.Variant{}, int32(5000))
if call.Err != nil {
panic(call.Err)
}
}