This commit is contained in:
Roi Martin 2017-08-20 00:17:11 +02:00
parent 881edc4380
commit 70497a1d13
1 changed files with 2 additions and 2 deletions

4
gui.go
View File

@ -322,7 +322,7 @@ type Manager interface {
// The ManagerFunc type is an adapter to allow the use of ordinary functions as // The ManagerFunc type is an adapter to allow the use of ordinary functions as
// Managers. If f is a function with the appropriate signature, ManagerFunc(f) // Managers. If f is a function with the appropriate signature, ManagerFunc(f)
// is an Manager object that calls f. // is an Manager object that calls f.
type ManagerFunc func(v *Gui) error type ManagerFunc func(g *Gui) error
// Layout calls f(g) // Layout calls f(g)
func (f ManagerFunc) Layout(g *Gui) error { func (f ManagerFunc) Layout(g *Gui) error {
@ -342,7 +342,7 @@ func (g *Gui) SetManager(managers ...Manager) {
// SetManagerFunc sets the given manager function. It deletes all views and // SetManagerFunc sets the given manager function. It deletes all views and
// keybindings. // keybindings.
func (g *Gui) SetManagerFunc(manager func(v *Gui) error) { func (g *Gui) SetManagerFunc(manager func(g *Gui) error) {
g.SetManager(ManagerFunc(manager)) g.SetManager(ManagerFunc(manager))
} }