This repository was archived by the owner on Jun 3, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 42
Expand file tree
/
Copy pathexample_test.go
More file actions
89 lines (76 loc) · 1.5 KB
/
example_test.go
File metadata and controls
89 lines (76 loc) · 1.5 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
package dlgs
import (
"time"
)
func ExampleColor() {
_, _, err := Color("Pick color", "#BEBEBE")
if err != nil {
panic(err)
}
}
func ExampleDate() {
_, _, err := Date("Date", "Date of traveling:", time.Now())
if err != nil {
panic(err)
}
}
func ExampleEntry() {
_, _, err := Entry("Entry", "Enter something here, anything:", "default text")
if err != nil {
panic(err)
}
}
func ExampleFile() {
_, _, err := File("Select file", "", false)
if err != nil {
panic(err)
}
}
func ExampleFileMulti() {
_, _, err := FileMulti("Select files", "")
if err != nil {
panic(err)
}
}
func ExampleList() {
_, _, err := List("List", "Select item from list:", []string{"Bug", "New Feature", "Improvement"})
if err != nil {
panic(err)
}
}
func ExampleListMulti() {
_, _, err := ListMulti("ListMulti", "Select languages from list:", []string{"PHP", "Go", "Python", "Bash"})
if err != nil {
panic(err)
}
}
func ExampleInfo() {
_, err := Info("Info", "Lorem ipsum dolor sit amet.")
if err != nil {
panic(err)
}
}
func ExampleWarning() {
_, err := Warning("Warning", "Incomplete information!")
if err != nil {
panic(err)
}
}
func ExampleError() {
_, err := Error("Error", "Cannot divide by zero.")
if err != nil {
panic(err)
}
}
func ExampleQuestion() {
_, err := Question("Question", "Are you sure you want to format this media?", true)
if err != nil {
panic(err)
}
}
func ExamplePassword() {
_, _, err := Password("Password", "Enter your API key:")
if err != nil {
panic(err)
}
}