zenity/msg_test.go

32 lines
644 B
Go
Raw Normal View History

2020-01-10 07:00:38 -05:00
package zenity_test
2020-01-04 22:21:39 -05:00
2020-01-10 07:00:38 -05:00
import "github.com/ncruces/zenity"
2020-01-04 22:21:39 -05:00
2020-01-10 07:00:38 -05:00
func ExampleError() {
2020-01-17 07:28:44 -05:00
zenity.Error("An error has occurred.",
2020-01-10 07:00:38 -05:00
zenity.Title("Error"),
zenity.Icon(zenity.ErrorIcon))
// Output:
2020-01-04 22:21:39 -05:00
}
2020-01-10 07:00:38 -05:00
func ExampleInfo() {
zenity.Info("All updates are complete.",
zenity.Title("Information"),
zenity.Icon(zenity.InfoIcon))
// Output:
2020-01-04 22:21:39 -05:00
}
2020-01-10 07:00:38 -05:00
func ExampleWarning() {
zenity.Warning("Are you sure you want to proceed?",
zenity.Title("Warning"),
zenity.Icon(zenity.WarningIcon))
// Output:
2020-01-04 22:21:39 -05:00
}
2020-01-10 07:00:38 -05:00
func ExampleQuestion() {
zenity.Question("Are you sure you want to proceed?",
zenity.Title("Question"),
zenity.Icon(zenity.QuestionIcon))
// Output:
2020-01-04 22:21:39 -05:00
}