dlgs
is a cross-platform library for displaying dialogs and input boxes.
go get -u github.com/gen2brain/dlgs
Documentation on GoDoc.
item, _, err := dlgs.List("List", "Select item from list:", []string{"Bug", "New Feature", "Improvement"})
if err != nil {
panic(err)
}
passwd, _, err := dlgs.Password("Password", "Enter your API key:")
if err != nil {
panic(err)
}
yes, err := dlgs.Question("Question", "Are you sure you want to format this media?", true)
if err != nil {
panic(err)
}
For cross-platform notifications and alerts see beeep.