diff options
Diffstat (limited to 'pkg/gui/controllers/common.go')
-rw-r--r-- | pkg/gui/controllers/common.go | 44 |
1 files changed, 13 insertions, 31 deletions
diff --git a/pkg/gui/controllers/common.go b/pkg/gui/controllers/common.go index 12a3788fd..3498ad59d 100644 --- a/pkg/gui/controllers/common.go +++ b/pkg/gui/controllers/common.go @@ -1,42 +1,24 @@ package controllers import ( - "github.com/jesseduffield/lazygit/pkg/commands" - "github.com/jesseduffield/lazygit/pkg/commands/oscommands" - "github.com/jesseduffield/lazygit/pkg/gui/context" "github.com/jesseduffield/lazygit/pkg/gui/controllers/helpers" - "github.com/jesseduffield/lazygit/pkg/gui/types" ) -type controllerCommon struct { - c *types.HelperCommon - os *oscommands.OSCommand - git *commands.GitCommand - helpers *helpers.Helpers - model *types.Model - contexts *context.ContextTree - modes *types.Modes - mutexes *types.Mutexes +type ControllerCommon struct { + *helpers.HelperCommon + IGetHelpers +} + +type IGetHelpers interface { + Helpers() *helpers.Helpers } func NewControllerCommon( - c *types.HelperCommon, - os *oscommands.OSCommand, - git *commands.GitCommand, - helpers *helpers.Helpers, - model *types.Model, - contexts *context.ContextTree, - modes *types.Modes, - mutexes *types.Mutexes, -) *controllerCommon { - return &controllerCommon{ - c: c, - os: os, - git: git, - helpers: helpers, - model: model, - contexts: contexts, - modes: modes, - mutexes: mutexes, + c *helpers.HelperCommon, + IGetHelpers IGetHelpers, +) *ControllerCommon { + return &ControllerCommon{ + HelperCommon: c, + IGetHelpers: IGetHelpers, } } |