diff --git a/pkg/gui/controllers/helpers/commits_helper.go b/pkg/gui/controllers/helpers/commits_helper.go index 27aafd7fc..c542b2d67 100644 --- a/pkg/gui/controllers/helpers/commits_helper.go +++ b/pkg/gui/controllers/helpers/commits_helper.go @@ -12,10 +12,6 @@ import ( "github.com/samber/lo" ) -type ICommitsHelper interface { - UpdateCommitPanelView(message string) -} - type CommitsHelper struct { c *HelperCommon @@ -26,8 +22,6 @@ type CommitsHelper struct { setCommitDescription func(string) } -var _ ICommitsHelper = &CommitsHelper{} - func NewCommitsHelper( c *HelperCommon, getCommitSummary func() string, diff --git a/pkg/gui/controllers/helpers/files_helper.go b/pkg/gui/controllers/helpers/files_helper.go index 24789ec0c..81c9b272e 100644 --- a/pkg/gui/controllers/helpers/files_helper.go +++ b/pkg/gui/controllers/helpers/files_helper.go @@ -6,12 +6,6 @@ import ( "github.com/samber/lo" ) -type IFilesHelper interface { - EditFiles(filenames []string) error - EditFileAtLine(filename string, lineNumber int) error - OpenFile(filename string) error -} - type FilesHelper struct { c *HelperCommon } @@ -22,8 +16,6 @@ func NewFilesHelper(c *HelperCommon) *FilesHelper { } } -var _ IFilesHelper = &FilesHelper{} - func (self *FilesHelper) EditFiles(filenames []string) error { absPaths := lo.Map(filenames, func(filename string, _ int) string { absPath, err := filepath.Abs(filename) diff --git a/pkg/gui/controllers/helpers/host_helper.go b/pkg/gui/controllers/helpers/host_helper.go index ab8631d36..42115e86f 100644 --- a/pkg/gui/controllers/helpers/host_helper.go +++ b/pkg/gui/controllers/helpers/host_helper.go @@ -6,11 +6,6 @@ import ( // this helper just wraps our hosting_service package -type IHostHelper interface { - GetPullRequestURL(from string, to string) (string, error) - GetCommitURL(commitHash string) (string, error) -} - type HostHelper struct { c *HelperCommon } diff --git a/pkg/gui/controllers/helpers/patch_building_helper.go b/pkg/gui/controllers/helpers/patch_building_helper.go index cde561fbc..1cf64b3f8 100644 --- a/pkg/gui/controllers/helpers/patch_building_helper.go +++ b/pkg/gui/controllers/helpers/patch_building_helper.go @@ -9,10 +9,6 @@ import ( "github.com/jesseduffield/lazygit/pkg/gui/types" ) -type IPatchBuildingHelper interface { - ValidateNormalWorkingTreeState() (bool, error) -} - type PatchBuildingHelper struct { c *HelperCommon } diff --git a/pkg/gui/controllers/helpers/refs_helper.go b/pkg/gui/controllers/helpers/refs_helper.go index fe78c09bd..c78b42b30 100644 --- a/pkg/gui/controllers/helpers/refs_helper.go +++ b/pkg/gui/controllers/helpers/refs_helper.go @@ -14,15 +14,6 @@ import ( "github.com/samber/lo" ) -type IRefsHelper interface { - CheckoutRef(ref string, options types.CheckoutRefOptions) error - GetCheckedOutRef() *models.Branch - CreateGitResetMenu(ref string) error - CreateCheckoutMenu(commit *models.Commit) error - ResetToRef(ref string, strength string, envVars []string) error - NewBranch(from string, fromDescription string, suggestedBranchname string) error -} - type RefsHelper struct { c *HelperCommon } @@ -35,8 +26,6 @@ func NewRefsHelper( } } -var _ IRefsHelper = &RefsHelper{} - func (self *RefsHelper) CheckoutRef(ref string, options types.CheckoutRefOptions) error { waitingStatus := options.WaitingStatus if waitingStatus == "" { diff --git a/pkg/gui/controllers/helpers/suggestions_helper.go b/pkg/gui/controllers/helpers/suggestions_helper.go index e5e933a8c..912e6cf59 100644 --- a/pkg/gui/controllers/helpers/suggestions_helper.go +++ b/pkg/gui/controllers/helpers/suggestions_helper.go @@ -26,20 +26,10 @@ import ( // finding suggestions in this file, so that it's easy to see if a function already // exists for fetching a particular model. -type ISuggestionsHelper interface { - GetRemoteSuggestionsFunc() func(string) []*types.Suggestion - GetBranchNameSuggestionsFunc() func(string) []*types.Suggestion - GetFilePathSuggestionsFunc() func(string) []*types.Suggestion - GetRemoteBranchesSuggestionsFunc(separator string) func(string) []*types.Suggestion - GetRefsSuggestionsFunc() func(string) []*types.Suggestion -} - type SuggestionsHelper struct { c *HelperCommon } -var _ ISuggestionsHelper = &SuggestionsHelper{} - func NewSuggestionsHelper( c *HelperCommon, ) *SuggestionsHelper { diff --git a/pkg/gui/controllers/helpers/upstream_helper.go b/pkg/gui/controllers/helpers/upstream_helper.go index c5d6ebe5b..092ca6bb1 100644 --- a/pkg/gui/controllers/helpers/upstream_helper.go +++ b/pkg/gui/controllers/helpers/upstream_helper.go @@ -14,15 +14,6 @@ type UpstreamHelper struct { getRemoteBranchesSuggestionsFunc func(string) func(string) []*types.Suggestion } -type IUpstreamHelper interface { - ParseUpstream(string) (string, string, error) - PromptForUpstreamWithInitialContent(*models.Branch, func(string) error) error - PromptForUpstreamWithoutInitialContent(*models.Branch, func(string) error) error - GetSuggestedRemote() string -} - -var _ IUpstreamHelper = &UpstreamHelper{} - func NewUpstreamHelper( c *HelperCommon, getRemoteBranchesSuggestionsFunc func(string) func(string) []*types.Suggestion, diff --git a/pkg/gui/controllers/helpers/working_tree_helper.go b/pkg/gui/controllers/helpers/working_tree_helper.go index e85e6702e..482c31c0d 100644 --- a/pkg/gui/controllers/helpers/working_tree_helper.go +++ b/pkg/gui/controllers/helpers/working_tree_helper.go @@ -12,13 +12,6 @@ import ( "github.com/jesseduffield/lazygit/pkg/gui/types" ) -type IWorkingTreeHelper interface { - AnyStagedFiles() bool - AnyTrackedFiles() bool - IsWorkingTreeDirty() bool - FileForSubmodule(submodule *models.SubmoduleConfig) *models.File -} - type WorkingTreeHelper struct { c *HelperCommon refHelper *RefsHelper diff --git a/pkg/gui/controllers/helpers/worktree_helper.go b/pkg/gui/controllers/helpers/worktree_helper.go index 6f28692d3..2d6460dcb 100644 --- a/pkg/gui/controllers/helpers/worktree_helper.go +++ b/pkg/gui/controllers/helpers/worktree_helper.go @@ -12,11 +12,6 @@ import ( "github.com/jesseduffield/lazygit/pkg/utils" ) -type IWorktreeHelper interface { - GetMainWorktreeName() string - GetCurrentWorktreeName() string -} - type WorktreeHelper struct { c *HelperCommon reposHelper *ReposHelper