-
-
Notifications
You must be signed in to change notification settings - Fork 43
Expand file tree
/
Copy pathentry.go
More file actions
21 lines (18 loc) · 634 Bytes
/
entry.go
File metadata and controls
21 lines (18 loc) · 634 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
package zenity
// Entry displays the text entry dialog.
//
// Valid options: Title, Width, Height, OKLabel, CancelLabel, ExtraButton,
// WindowIcon, Attach, Modal, EntryText, HideText.
//
// May return: ErrCanceled, ErrExtraButton.
func Entry(text string, options ...Option) (string, error) {
return entry(text, applyOptions(options))
}
// EntryText returns an Option to set the entry text.
func EntryText(text string) Option {
return funcOption(func(o *options) { o.entryText = text })
}
// HideText returns an Option to hide the entry text.
func HideText() Option {
return funcOption(func(o *options) { o.hideText = true })
}