diff options
author | Jesse Duffield <jessedduffield@gmail.com> | 2022-02-06 15:54:26 +1100 |
---|---|---|
committer | Jesse Duffield <jessedduffield@gmail.com> | 2022-03-17 19:13:40 +1100 |
commit | 722410aded4e3d14356c7ab94bfa15abe10359fa (patch) | |
tree | 8e8a57503b0b57bccca5fa8cd146bc699960033f /pkg/gui/controllers/common.go | |
parent | b93b8cc00a2f2ea339b1ecdbc380320556490d3b (diff) |
refactor controllers
Diffstat (limited to 'pkg/gui/controllers/common.go')
-rw-r--r-- | pkg/gui/controllers/common.go | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/pkg/gui/controllers/common.go b/pkg/gui/controllers/common.go new file mode 100644 index 000000000..55ba4b176 --- /dev/null +++ b/pkg/gui/controllers/common.go @@ -0,0 +1,39 @@ +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 +} + +func NewControllerCommon( + c *types.HelperCommon, + os *oscommands.OSCommand, + git *commands.GitCommand, + helpers *helpers.Helpers, + model *types.Model, + contexts *context.ContextTree, + modes *types.Modes, +) *controllerCommon { + return &controllerCommon{ + c: c, + os: os, + git: git, + helpers: helpers, + model: model, + contexts: contexts, + modes: modes, + } +} |