1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2024-12-12 11:15:00 +02:00
lazygit/pkg/gui/dummies.go

22 lines
857 B
Go
Raw Normal View History

package gui
import (
"github.com/jesseduffield/lazygit/pkg/commands"
2021-07-22 19:45:43 +02:00
"github.com/jesseduffield/lazygit/pkg/commands/oscommands"
"github.com/jesseduffield/lazygit/pkg/config"
"github.com/jesseduffield/lazygit/pkg/i18n"
"github.com/jesseduffield/lazygit/pkg/updates"
2021-07-22 19:45:43 +02:00
"github.com/jesseduffield/lazygit/pkg/utils"
)
// NewDummyGui creates a new dummy GUI for testing
func NewDummyUpdater() *updates.Updater {
2021-07-22 19:45:43 +02:00
DummyUpdater, _ := updates.NewUpdater(utils.NewDummyLog(), config.NewDummyAppConfig(), oscommands.NewDummyOSCommand(), i18n.NewTranslationSet(utils.NewDummyLog()))
return DummyUpdater
}
func NewDummyGui() *Gui {
2021-07-22 19:45:43 +02:00
DummyGui, _ := NewGui(utils.NewDummyLog(), commands.NewDummyGitCommand(), oscommands.NewDummyOSCommand(), i18n.NewTranslationSet(utils.NewDummyLog()), config.NewDummyAppConfig(), NewDummyUpdater(), "", false)
return DummyGui
}