Error handling. Vendoring
Signed-off-by: Ettore Dreucci <ettore.dreucci@gmail.com>
This commit is contained in:
21
vendor/github.com/dixonwille/wmenu/option.go
generated
vendored
Normal file
21
vendor/github.com/dixonwille/wmenu/option.go
generated
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
package wmenu
|
||||
|
||||
//Opt is what Menu uses to display options to screen.
|
||||
//Also holds information on what should run and if it is a default option
|
||||
type Opt struct {
|
||||
ID int
|
||||
Text string
|
||||
Value interface{}
|
||||
function func(Opt) error
|
||||
isDefault bool
|
||||
}
|
||||
|
||||
func newOption(id int, text string, value interface{}, def bool, function func(Opt) error) *Opt {
|
||||
return &Opt{
|
||||
ID: id,
|
||||
Text: text,
|
||||
Value: value,
|
||||
isDefault: def,
|
||||
function: function,
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user