summaryrefslogtreecommitdiffstats
path: root/pkg/gui/controllers/common.go
blob: 12a3788fdd647453cdf04cea6cc38bf16302fef4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
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
}

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,
	}
}