summaryrefslogtreecommitdiffstats
path: root/pkg/gui/controllers/attach.go
blob: 3e621c54c5846fe11685a34f8df1a056e54aeb26 (plain)
1
2
3
4
5
6
7
8
9
10
11
package controllers

import "github.com/jesseduffield/lazygit/pkg/gui/types"

func AttachControllers(context types.Context, controllers ...types.IController) {
	for _, controller := range controllers {
		context.AddKeybindingsFn(controller.GetKeybindings)
		context.AddMouseKeybindingsFn(controller.GetMouseKeybindings)
		context.AddOnClickFn(controller.GetOnClick())
	}
}