dlgs
is a cross-platform library for displaying dialogs and input boxes.
NOTE: This repository is archived and will not be maintained anymore. See https://github.com/ncruces/zenity for cgo-free dialogs, also check https://github.com/gen2brain/iup-go for full-blown UI.
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.