how to execute toast actions using buttons in go

  action-button, go, notifications, toast, windows

This code from the https://github.com/go-toast/toast package of GO below opens up map.
How do I open terminal using that action button to execute a command?

package main

import (
    "log"

    "gopkg.in/toast.v1"
)

func main() {
    notification := toast.Notification{
        AppID: "Example App",
        Title: "My notification",
        Message: "Some message about how important something is...",
        Icon: "go.png", // This file must exist (remove this line if it doesn't)
        Actions: []toast.Action{
            {"protocol", "I'm a button", "bingmaps:?=sushi"},
            {"protocol", "Me too!", ""},
        },
    }
    err := notification.Push()
    if err != nil {
        log.Fatalln(err)
    }
}

Source: Windows Questions

LEAVE A COMMENT