Function bodies 244 total
gitops.RealClient.HasRemote method · go · L510-L520 (11 LOC)pkg/gitops/gitops.go
func (c *RealClient) HasRemote(repoPath string) (bool, error) {
root, err := c.RepoRoot(repoPath)
if err != nil {
return false, err
}
out, err := exec.Command("git", "-C", root, "remote").Output()
if err != nil {
return false, fmt.Errorf("failed to check remotes: %w", err)
}
return strings.TrimSpace(string(out)) != "", nil
}gitops.RealClient.Fetch method · go · L522-L528 (7 LOC)pkg/gitops/gitops.go
func (c *RealClient) Fetch(repoPath string) error {
out, err := exec.Command("git", "-C", repoPath, "fetch").CombinedOutput()
if err != nil {
return fmt.Errorf("git fetch failed: %s: %w", strings.TrimSpace(string(out)), err)
}
return nil
}gitops.RealClient.CommitsAhead method · go · L530-L541 (12 LOC)pkg/gitops/gitops.go
func (c *RealClient) CommitsAhead(worktreePath, baseBranch string) (int, error) {
out, err := exec.Command("git", "-C", worktreePath, "rev-list", "--count", baseBranch+"..HEAD").Output()
if err != nil {
return 0, fmt.Errorf("failed to count commits ahead: %w", err)
}
var count int
_, err = fmt.Sscanf(strings.TrimSpace(string(out)), "%d", &count)
if err != nil {
return 0, fmt.Errorf("failed to parse commit count: %w", err)
}
return count, nil
}gitops.RealClient.CommitsBehind method · go · L543-L554 (12 LOC)pkg/gitops/gitops.go
func (c *RealClient) CommitsBehind(worktreePath, baseBranch string) (int, error) {
out, err := exec.Command("git", "-C", worktreePath, "rev-list", "--count", "HEAD.."+baseBranch).Output()
if err != nil {
return 0, fmt.Errorf("failed to count commits behind: %w", err)
}
var count int
_, err = fmt.Sscanf(strings.TrimSpace(string(out)), "%d", &count)
if err != nil {
return 0, fmt.Errorf("failed to parse commit count: %w", err)
}
return count, nil
}mocks.MockClient.BranchDelete method · go · L24-L39 (16 LOC)pkg/gitops/mocks/mock_Client.go
func (_m *MockClient) BranchDelete(repoPath string, branch string, force bool) error {
ret := _m.Called(repoPath, branch, force)
if len(ret) == 0 {
panic("no return value specified for BranchDelete")
}
var r0 error
if rf, ok := ret.Get(0).(func(string, string, bool) error); ok {
r0 = rf(repoPath, branch, force)
} else {
r0 = ret.Error(0)
}
return r0
}mocks.MockClient_BranchDelete_Call.Run method · go · L54-L59 (6 LOC)pkg/gitops/mocks/mock_Client.go
func (_c *MockClient_BranchDelete_Call) Run(run func(repoPath string, branch string, force bool)) *MockClient_BranchDelete_Call {
_c.Call.Run(func(args mock.Arguments) {
run(args[0].(string), args[1].(string), args[2].(bool))
})
return _c
}mocks.MockClient.BranchExists method · go · L72-L97 (26 LOC)pkg/gitops/mocks/mock_Client.go
func (_m *MockClient) BranchExists(repoPath string, branch string) (bool, error) {
ret := _m.Called(repoPath, branch)
if len(ret) == 0 {
panic("no return value specified for BranchExists")
}
var r0 bool
var r1 error
if rf, ok := ret.Get(0).(func(string, string) (bool, error)); ok {
return rf(repoPath, branch)
}
if rf, ok := ret.Get(0).(func(string, string) bool); ok {
r0 = rf(repoPath, branch)
} else {
r0 = ret.Get(0).(bool)
}
if rf, ok := ret.Get(1).(func(string, string) error); ok {
r1 = rf(repoPath, branch)
} else {
r1 = ret.Error(1)
}
return r0, r1
}Repobility · MCP-ready · https://repobility.com
mocks.MockClient_BranchExists_Call.Run method · go · L111-L116 (6 LOC)pkg/gitops/mocks/mock_Client.go
func (_c *MockClient_BranchExists_Call) Run(run func(repoPath string, branch string)) *MockClient_BranchExists_Call {
_c.Call.Run(func(args mock.Arguments) {
run(args[0].(string), args[1].(string))
})
return _c
}mocks.MockClient.BranchList method · go · L129-L156 (28 LOC)pkg/gitops/mocks/mock_Client.go
func (_m *MockClient) BranchList(repoPath string) ([]string, error) {
ret := _m.Called(repoPath)
if len(ret) == 0 {
panic("no return value specified for BranchList")
}
var r0 []string
var r1 error
if rf, ok := ret.Get(0).(func(string) ([]string, error)); ok {
return rf(repoPath)
}
if rf, ok := ret.Get(0).(func(string) []string); ok {
r0 = rf(repoPath)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).([]string)
}
}
if rf, ok := ret.Get(1).(func(string) error); ok {
r1 = rf(repoPath)
} else {
r1 = ret.Error(1)
}
return r0, r1
}mocks.MockClient_BranchList_Call.Run method · go · L169-L174 (6 LOC)pkg/gitops/mocks/mock_Client.go
func (_c *MockClient_BranchList_Call) Run(run func(repoPath string)) *MockClient_BranchList_Call {
_c.Call.Run(func(args mock.Arguments) {
run(args[0].(string))
})
return _c
}mocks.MockClient.CommitsAhead method · go · L187-L212 (26 LOC)pkg/gitops/mocks/mock_Client.go
func (_m *MockClient) CommitsAhead(worktreePath string, baseBranch string) (int, error) {
ret := _m.Called(worktreePath, baseBranch)
if len(ret) == 0 {
panic("no return value specified for CommitsAhead")
}
var r0 int
var r1 error
if rf, ok := ret.Get(0).(func(string, string) (int, error)); ok {
return rf(worktreePath, baseBranch)
}
if rf, ok := ret.Get(0).(func(string, string) int); ok {
r0 = rf(worktreePath, baseBranch)
} else {
r0 = ret.Get(0).(int)
}
if rf, ok := ret.Get(1).(func(string, string) error); ok {
r1 = rf(worktreePath, baseBranch)
} else {
r1 = ret.Error(1)
}
return r0, r1
}mocks.MockClient_CommitsAhead_Call.Run method · go · L226-L231 (6 LOC)pkg/gitops/mocks/mock_Client.go
func (_c *MockClient_CommitsAhead_Call) Run(run func(worktreePath string, baseBranch string)) *MockClient_CommitsAhead_Call {
_c.Call.Run(func(args mock.Arguments) {
run(args[0].(string), args[1].(string))
})
return _c
}mocks.MockClient.CommitsBehind method · go · L244-L269 (26 LOC)pkg/gitops/mocks/mock_Client.go
func (_m *MockClient) CommitsBehind(worktreePath string, baseBranch string) (int, error) {
ret := _m.Called(worktreePath, baseBranch)
if len(ret) == 0 {
panic("no return value specified for CommitsBehind")
}
var r0 int
var r1 error
if rf, ok := ret.Get(0).(func(string, string) (int, error)); ok {
return rf(worktreePath, baseBranch)
}
if rf, ok := ret.Get(0).(func(string, string) int); ok {
r0 = rf(worktreePath, baseBranch)
} else {
r0 = ret.Get(0).(int)
}
if rf, ok := ret.Get(1).(func(string, string) error); ok {
r1 = rf(worktreePath, baseBranch)
} else {
r1 = ret.Error(1)
}
return r0, r1
}mocks.MockClient_CommitsBehind_Call.Run method · go · L283-L288 (6 LOC)pkg/gitops/mocks/mock_Client.go
func (_c *MockClient_CommitsBehind_Call) Run(run func(worktreePath string, baseBranch string)) *MockClient_CommitsBehind_Call {
_c.Call.Run(func(args mock.Arguments) {
run(args[0].(string), args[1].(string))
})
return _c
}mocks.MockClient.CurrentBranch method · go · L301-L326 (26 LOC)pkg/gitops/mocks/mock_Client.go
func (_m *MockClient) CurrentBranch(worktreePath string) (string, error) {
ret := _m.Called(worktreePath)
if len(ret) == 0 {
panic("no return value specified for CurrentBranch")
}
var r0 string
var r1 error
if rf, ok := ret.Get(0).(func(string) (string, error)); ok {
return rf(worktreePath)
}
if rf, ok := ret.Get(0).(func(string) string); ok {
r0 = rf(worktreePath)
} else {
r0 = ret.Get(0).(string)
}
if rf, ok := ret.Get(1).(func(string) error); ok {
r1 = rf(worktreePath)
} else {
r1 = ret.Error(1)
}
return r0, r1
}Citation: Repobility (2026). State of AI-Generated Code. https://repobility.com/research/
mocks.MockClient_CurrentBranch_Call.Run method · go · L339-L344 (6 LOC)pkg/gitops/mocks/mock_Client.go
func (_c *MockClient_CurrentBranch_Call) Run(run func(worktreePath string)) *MockClient_CurrentBranch_Call {
_c.Call.Run(func(args mock.Arguments) {
run(args[0].(string))
})
return _c
}mocks.MockClient.Fetch method · go · L357-L372 (16 LOC)pkg/gitops/mocks/mock_Client.go
func (_m *MockClient) Fetch(repoPath string) error {
ret := _m.Called(repoPath)
if len(ret) == 0 {
panic("no return value specified for Fetch")
}
var r0 error
if rf, ok := ret.Get(0).(func(string) error); ok {
r0 = rf(repoPath)
} else {
r0 = ret.Error(0)
}
return r0
}mocks.MockClient_Fetch_Call.Run method · go · L385-L390 (6 LOC)pkg/gitops/mocks/mock_Client.go
func (_c *MockClient_Fetch_Call) Run(run func(repoPath string)) *MockClient_Fetch_Call {
_c.Call.Run(func(args mock.Arguments) {
run(args[0].(string))
})
return _c
}mocks.MockClient.HasConflicts method · go · L403-L428 (26 LOC)pkg/gitops/mocks/mock_Client.go
func (_m *MockClient) HasConflicts(repoPath string) (bool, error) {
ret := _m.Called(repoPath)
if len(ret) == 0 {
panic("no return value specified for HasConflicts")
}
var r0 bool
var r1 error
if rf, ok := ret.Get(0).(func(string) (bool, error)); ok {
return rf(repoPath)
}
if rf, ok := ret.Get(0).(func(string) bool); ok {
r0 = rf(repoPath)
} else {
r0 = ret.Get(0).(bool)
}
if rf, ok := ret.Get(1).(func(string) error); ok {
r1 = rf(repoPath)
} else {
r1 = ret.Error(1)
}
return r0, r1
}mocks.MockClient_HasConflicts_Call.Run method · go · L441-L446 (6 LOC)pkg/gitops/mocks/mock_Client.go
func (_c *MockClient_HasConflicts_Call) Run(run func(repoPath string)) *MockClient_HasConflicts_Call {
_c.Call.Run(func(args mock.Arguments) {
run(args[0].(string))
})
return _c
}mocks.MockClient.HasRemote method · go · L459-L484 (26 LOC)pkg/gitops/mocks/mock_Client.go
func (_m *MockClient) HasRemote(repoPath string) (bool, error) {
ret := _m.Called(repoPath)
if len(ret) == 0 {
panic("no return value specified for HasRemote")
}
var r0 bool
var r1 error
if rf, ok := ret.Get(0).(func(string) (bool, error)); ok {
return rf(repoPath)
}
if rf, ok := ret.Get(0).(func(string) bool); ok {
r0 = rf(repoPath)
} else {
r0 = ret.Get(0).(bool)
}
if rf, ok := ret.Get(1).(func(string) error); ok {
r1 = rf(repoPath)
} else {
r1 = ret.Error(1)
}
return r0, r1
}mocks.MockClient_HasRemote_Call.Run method · go · L497-L502 (6 LOC)pkg/gitops/mocks/mock_Client.go
func (_c *MockClient_HasRemote_Call) Run(run func(repoPath string)) *MockClient_HasRemote_Call {
_c.Call.Run(func(args mock.Arguments) {
run(args[0].(string))
})
return _c
}mocks.MockClient.HasUnpushedCommits method · go · L515-L540 (26 LOC)pkg/gitops/mocks/mock_Client.go
func (_m *MockClient) HasUnpushedCommits(path string, baseBranch string) (bool, error) {
ret := _m.Called(path, baseBranch)
if len(ret) == 0 {
panic("no return value specified for HasUnpushedCommits")
}
var r0 bool
var r1 error
if rf, ok := ret.Get(0).(func(string, string) (bool, error)); ok {
return rf(path, baseBranch)
}
if rf, ok := ret.Get(0).(func(string, string) bool); ok {
r0 = rf(path, baseBranch)
} else {
r0 = ret.Get(0).(bool)
}
if rf, ok := ret.Get(1).(func(string, string) error); ok {
r1 = rf(path, baseBranch)
} else {
r1 = ret.Error(1)
}
return r0, r1
}Want this analysis on your repo? https://repobility.com/scan/
mocks.MockClient_HasUnpushedCommits_Call.Run method · go · L554-L559 (6 LOC)pkg/gitops/mocks/mock_Client.go
func (_c *MockClient_HasUnpushedCommits_Call) Run(run func(path string, baseBranch string)) *MockClient_HasUnpushedCommits_Call {
_c.Call.Run(func(args mock.Arguments) {
run(args[0].(string), args[1].(string))
})
return _c
}mocks.MockClient.IsMergeInProgress method · go · L572-L597 (26 LOC)pkg/gitops/mocks/mock_Client.go
func (_m *MockClient) IsMergeInProgress(repoPath string) (bool, error) {
ret := _m.Called(repoPath)
if len(ret) == 0 {
panic("no return value specified for IsMergeInProgress")
}
var r0 bool
var r1 error
if rf, ok := ret.Get(0).(func(string) (bool, error)); ok {
return rf(repoPath)
}
if rf, ok := ret.Get(0).(func(string) bool); ok {
r0 = rf(repoPath)
} else {
r0 = ret.Get(0).(bool)
}
if rf, ok := ret.Get(1).(func(string) error); ok {
r1 = rf(repoPath)
} else {
r1 = ret.Error(1)
}
return r0, r1
}mocks.MockClient_IsMergeInProgress_Call.Run method · go · L610-L615 (6 LOC)pkg/gitops/mocks/mock_Client.go
func (_c *MockClient_IsMergeInProgress_Call) Run(run func(repoPath string)) *MockClient_IsMergeInProgress_Call {
_c.Call.Run(func(args mock.Arguments) {
run(args[0].(string))
})
return _c
}mocks.MockClient.IsRebaseInProgress method · go · L628-L653 (26 LOC)pkg/gitops/mocks/mock_Client.go
func (_m *MockClient) IsRebaseInProgress(repoPath string) (bool, error) {
ret := _m.Called(repoPath)
if len(ret) == 0 {
panic("no return value specified for IsRebaseInProgress")
}
var r0 bool
var r1 error
if rf, ok := ret.Get(0).(func(string) (bool, error)); ok {
return rf(repoPath)
}
if rf, ok := ret.Get(0).(func(string) bool); ok {
r0 = rf(repoPath)
} else {
r0 = ret.Get(0).(bool)
}
if rf, ok := ret.Get(1).(func(string) error); ok {
r1 = rf(repoPath)
} else {
r1 = ret.Error(1)
}
return r0, r1
}mocks.MockClient_IsRebaseInProgress_Call.Run method · go · L666-L671 (6 LOC)pkg/gitops/mocks/mock_Client.go
func (_c *MockClient_IsRebaseInProgress_Call) Run(run func(repoPath string)) *MockClient_IsRebaseInProgress_Call {
_c.Call.Run(func(args mock.Arguments) {
run(args[0].(string))
})
return _c
}mocks.MockClient.IsWorktreeDirty method · go · L684-L709 (26 LOC)pkg/gitops/mocks/mock_Client.go
func (_m *MockClient) IsWorktreeDirty(path string) (bool, error) {
ret := _m.Called(path)
if len(ret) == 0 {
panic("no return value specified for IsWorktreeDirty")
}
var r0 bool
var r1 error
if rf, ok := ret.Get(0).(func(string) (bool, error)); ok {
return rf(path)
}
if rf, ok := ret.Get(0).(func(string) bool); ok {
r0 = rf(path)
} else {
r0 = ret.Get(0).(bool)
}
if rf, ok := ret.Get(1).(func(string) error); ok {
r1 = rf(path)
} else {
r1 = ret.Error(1)
}
return r0, r1
}mocks.MockClient_IsWorktreeDirty_Call.Run method · go · L722-L727 (6 LOC)pkg/gitops/mocks/mock_Client.go
func (_c *MockClient_IsWorktreeDirty_Call) Run(run func(path string)) *MockClient_IsWorktreeDirty_Call {
_c.Call.Run(func(args mock.Arguments) {
run(args[0].(string))
})
return _c
}mocks.MockClient.Merge method · go · L740-L755 (16 LOC)pkg/gitops/mocks/mock_Client.go
func (_m *MockClient) Merge(repoPath string, branch string) error {
ret := _m.Called(repoPath, branch)
if len(ret) == 0 {
panic("no return value specified for Merge")
}
var r0 error
if rf, ok := ret.Get(0).(func(string, string) error); ok {
r0 = rf(repoPath, branch)
} else {
r0 = ret.Error(0)
}
return r0
}Generated by Repobility's multi-pass static-analysis pipeline (https://repobility.com)
mocks.MockClient_Merge_Call.Run method · go · L769-L774 (6 LOC)pkg/gitops/mocks/mock_Client.go
func (_c *MockClient_Merge_Call) Run(run func(repoPath string, branch string)) *MockClient_Merge_Call {
_c.Call.Run(func(args mock.Arguments) {
run(args[0].(string), args[1].(string))
})
return _c
}mocks.MockClient.MergeContinue method · go · L787-L802 (16 LOC)pkg/gitops/mocks/mock_Client.go
func (_m *MockClient) MergeContinue(repoPath string) error {
ret := _m.Called(repoPath)
if len(ret) == 0 {
panic("no return value specified for MergeContinue")
}
var r0 error
if rf, ok := ret.Get(0).(func(string) error); ok {
r0 = rf(repoPath)
} else {
r0 = ret.Error(0)
}
return r0
}mocks.MockClient_MergeContinue_Call.Run method · go · L815-L820 (6 LOC)pkg/gitops/mocks/mock_Client.go
func (_c *MockClient_MergeContinue_Call) Run(run func(repoPath string)) *MockClient_MergeContinue_Call {
_c.Call.Run(func(args mock.Arguments) {
run(args[0].(string))
})
return _c
}mocks.MockClient.Pull method · go · L833-L848 (16 LOC)pkg/gitops/mocks/mock_Client.go
func (_m *MockClient) Pull(repoPath string) error {
ret := _m.Called(repoPath)
if len(ret) == 0 {
panic("no return value specified for Pull")
}
var r0 error
if rf, ok := ret.Get(0).(func(string) error); ok {
r0 = rf(repoPath)
} else {
r0 = ret.Error(0)
}
return r0
}mocks.MockClient_Pull_Call.Run method · go · L861-L866 (6 LOC)pkg/gitops/mocks/mock_Client.go
func (_c *MockClient_Pull_Call) Run(run func(repoPath string)) *MockClient_Pull_Call {
_c.Call.Run(func(args mock.Arguments) {
run(args[0].(string))
})
return _c
}mocks.MockClient.Push method · go · L879-L894 (16 LOC)pkg/gitops/mocks/mock_Client.go
func (_m *MockClient) Push(worktreePath string, branch string, setUpstream bool) error {
ret := _m.Called(worktreePath, branch, setUpstream)
if len(ret) == 0 {
panic("no return value specified for Push")
}
var r0 error
if rf, ok := ret.Get(0).(func(string, string, bool) error); ok {
r0 = rf(worktreePath, branch, setUpstream)
} else {
r0 = ret.Error(0)
}
return r0
}mocks.MockClient_Push_Call.Run method · go · L909-L914 (6 LOC)pkg/gitops/mocks/mock_Client.go
func (_c *MockClient_Push_Call) Run(run func(worktreePath string, branch string, setUpstream bool)) *MockClient_Push_Call {
_c.Call.Run(func(args mock.Arguments) {
run(args[0].(string), args[1].(string), args[2].(bool))
})
return _c
}mocks.MockClient.Rebase method · go · L927-L942 (16 LOC)pkg/gitops/mocks/mock_Client.go
func (_m *MockClient) Rebase(repoPath string, branch string) error {
ret := _m.Called(repoPath, branch)
if len(ret) == 0 {
panic("no return value specified for Rebase")
}
var r0 error
if rf, ok := ret.Get(0).(func(string, string) error); ok {
r0 = rf(repoPath, branch)
} else {
r0 = ret.Error(0)
}
return r0
}Repobility · MCP-ready · https://repobility.com
mocks.MockClient_Rebase_Call.Run method · go · L956-L961 (6 LOC)pkg/gitops/mocks/mock_Client.go
func (_c *MockClient_Rebase_Call) Run(run func(repoPath string, branch string)) *MockClient_Rebase_Call {
_c.Call.Run(func(args mock.Arguments) {
run(args[0].(string), args[1].(string))
})
return _c
}mocks.MockClient.RebaseAbort method · go · L974-L989 (16 LOC)pkg/gitops/mocks/mock_Client.go
func (_m *MockClient) RebaseAbort(repoPath string) error {
ret := _m.Called(repoPath)
if len(ret) == 0 {
panic("no return value specified for RebaseAbort")
}
var r0 error
if rf, ok := ret.Get(0).(func(string) error); ok {
r0 = rf(repoPath)
} else {
r0 = ret.Error(0)
}
return r0
}mocks.MockClient_RebaseAbort_Call.Run method · go · L1002-L1007 (6 LOC)pkg/gitops/mocks/mock_Client.go
func (_c *MockClient_RebaseAbort_Call) Run(run func(repoPath string)) *MockClient_RebaseAbort_Call {
_c.Call.Run(func(args mock.Arguments) {
run(args[0].(string))
})
return _c
}mocks.MockClient.RebaseContinue method · go · L1020-L1035 (16 LOC)pkg/gitops/mocks/mock_Client.go
func (_m *MockClient) RebaseContinue(repoPath string) error {
ret := _m.Called(repoPath)
if len(ret) == 0 {
panic("no return value specified for RebaseContinue")
}
var r0 error
if rf, ok := ret.Get(0).(func(string) error); ok {
r0 = rf(repoPath)
} else {
r0 = ret.Error(0)
}
return r0
}mocks.MockClient_RebaseContinue_Call.Run method · go · L1048-L1053 (6 LOC)pkg/gitops/mocks/mock_Client.go
func (_c *MockClient_RebaseContinue_Call) Run(run func(repoPath string)) *MockClient_RebaseContinue_Call {
_c.Call.Run(func(args mock.Arguments) {
run(args[0].(string))
})
return _c
}mocks.MockClient.RepoName method · go · L1066-L1091 (26 LOC)pkg/gitops/mocks/mock_Client.go
func (_m *MockClient) RepoName(repoPath string) (string, error) {
ret := _m.Called(repoPath)
if len(ret) == 0 {
panic("no return value specified for RepoName")
}
var r0 string
var r1 error
if rf, ok := ret.Get(0).(func(string) (string, error)); ok {
return rf(repoPath)
}
if rf, ok := ret.Get(0).(func(string) string); ok {
r0 = rf(repoPath)
} else {
r0 = ret.Get(0).(string)
}
if rf, ok := ret.Get(1).(func(string) error); ok {
r1 = rf(repoPath)
} else {
r1 = ret.Error(1)
}
return r0, r1
}mocks.MockClient_RepoName_Call.Run method · go · L1104-L1109 (6 LOC)pkg/gitops/mocks/mock_Client.go
func (_c *MockClient_RepoName_Call) Run(run func(repoPath string)) *MockClient_RepoName_Call {
_c.Call.Run(func(args mock.Arguments) {
run(args[0].(string))
})
return _c
}mocks.MockClient.RepoRoot method · go · L1122-L1147 (26 LOC)pkg/gitops/mocks/mock_Client.go
func (_m *MockClient) RepoRoot(repoPath string) (string, error) {
ret := _m.Called(repoPath)
if len(ret) == 0 {
panic("no return value specified for RepoRoot")
}
var r0 string
var r1 error
if rf, ok := ret.Get(0).(func(string) (string, error)); ok {
return rf(repoPath)
}
if rf, ok := ret.Get(0).(func(string) string); ok {
r0 = rf(repoPath)
} else {
r0 = ret.Get(0).(string)
}
if rf, ok := ret.Get(1).(func(string) error); ok {
r1 = rf(repoPath)
} else {
r1 = ret.Error(1)
}
return r0, r1
}Citation: Repobility (2026). State of AI-Generated Code. https://repobility.com/research/
mocks.MockClient_RepoRoot_Call.Run method · go · L1160-L1165 (6 LOC)pkg/gitops/mocks/mock_Client.go
func (_c *MockClient_RepoRoot_Call) Run(run func(repoPath string)) *MockClient_RepoRoot_Call {
_c.Call.Run(func(args mock.Arguments) {
run(args[0].(string))
})
return _c
}mocks.MockClient.ResolveWorktree method · go · L1178-L1203 (26 LOC)pkg/gitops/mocks/mock_Client.go
func (_m *MockClient) ResolveWorktree(repoPath string, input string) (string, error) {
ret := _m.Called(repoPath, input)
if len(ret) == 0 {
panic("no return value specified for ResolveWorktree")
}
var r0 string
var r1 error
if rf, ok := ret.Get(0).(func(string, string) (string, error)); ok {
return rf(repoPath, input)
}
if rf, ok := ret.Get(0).(func(string, string) string); ok {
r0 = rf(repoPath, input)
} else {
r0 = ret.Get(0).(string)
}
if rf, ok := ret.Get(1).(func(string, string) error); ok {
r1 = rf(repoPath, input)
} else {
r1 = ret.Error(1)
}
return r0, r1
}mocks.MockClient_ResolveWorktree_Call.Run method · go · L1217-L1222 (6 LOC)pkg/gitops/mocks/mock_Client.go
func (_c *MockClient_ResolveWorktree_Call) Run(run func(repoPath string, input string)) *MockClient_ResolveWorktree_Call {
_c.Call.Run(func(args mock.Arguments) {
run(args[0].(string), args[1].(string))
})
return _c
}