diff options
author | Jesse Duffield <jessedduffield@gmail.com> | 2023-03-23 13:04:57 +1100 |
---|---|---|
committer | Jesse Duffield <jessedduffield@gmail.com> | 2023-04-30 13:19:53 +1000 |
commit | 711674f6cd68ed3a35e5b0329ff0cf3289fbc7d1 (patch) | |
tree | 965c3503390213b1a7d1fb3737a9712b3af86550 /pkg/gui/controllers/common.go | |
parent | fc91ef6a59e3cf8336b1cef78c210907c08a4cda (diff) |
standardise controller helper methods
Diffstat (limited to 'pkg/gui/controllers/common.go')
-rw-r--r-- | pkg/gui/controllers/common.go | 36 |
1 files changed, 4 insertions, 32 deletions
diff --git a/pkg/gui/controllers/common.go b/pkg/gui/controllers/common.go index e1af81732..1c14b7f4e 100644 --- a/pkg/gui/controllers/common.go +++ b/pkg/gui/controllers/common.go @@ -1,48 +1,20 @@ 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 *helpers.HelperCommon - helpers *helpers.Helpers - contexts *context.ContextTree - - // TODO: use helperCommon's .OS() method instead of this - os *oscommands.OSCommand - // TODO: use helperCommon's .Git() method instead of this - git *commands.GitCommand - // TODO: use helperCommon's .Model() method instead of this - model *types.Model - // TODO: use helperCommon's .Modes() method instead of this - modes *types.Modes - // TODO: use helperCommon's .Mutexes() method instead of this - mutexes *types.Mutexes + c *helpers.HelperCommon + helpers *helpers.Helpers } func NewControllerCommon( c *helpers.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: c, + helpers: helpers, } } |