diff options
author | Jesse Duffield <jessedduffield@gmail.com> | 2023-07-24 13:06:42 +1000 |
---|---|---|
committer | Jesse Duffield <jessedduffield@gmail.com> | 2023-07-30 18:51:23 +1000 |
commit | e33fe37a99d4b3866970b1b2f40169d1bc9afa2e (patch) | |
tree | 0027f612fb72b2603044d04389da0236df28d864 /pkg/commands/git_commands/commit_file_loader.go | |
parent | ea54cb6e9c07ebca4a53e691fcb3cf993c793a50 (diff) |
Standardise on using lo for slice functions
We've been sometimes using lo and sometimes using my slices package, and we need to pick one
for consistency. Lo is more extensive and better maintained so we're going with that.
My slices package was a superset of go's own slices package so in some places I've just used
the official one (the methods were just wrappers anyway).
I've also moved the remaining methods into the utils package.
Diffstat (limited to 'pkg/commands/git_commands/commit_file_loader.go')
-rw-r--r-- | pkg/commands/git_commands/commit_file_loader.go | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/pkg/commands/git_commands/commit_file_loader.go b/pkg/commands/git_commands/commit_file_loader.go index d89c3c578..7abdc74c5 100644 --- a/pkg/commands/git_commands/commit_file_loader.go +++ b/pkg/commands/git_commands/commit_file_loader.go @@ -3,7 +3,6 @@ package git_commands import ( "strings" - "github.com/jesseduffield/generics/slices" "github.com/jesseduffield/lazygit/pkg/commands/models" "github.com/jesseduffield/lazygit/pkg/commands/oscommands" "github.com/jesseduffield/lazygit/pkg/common" @@ -52,7 +51,7 @@ func getCommitFilesFromFilenames(filenames string) []*models.CommitFile { } // typical result looks like 'A my_file' meaning my_file was added - return slices.Map(lo.Chunk(lines, 2), func(chunk []string) *models.CommitFile { + return lo.Map(lo.Chunk(lines, 2), func(chunk []string, _ int) *models.CommitFile { return &models.CommitFile{ ChangeStatus: chunk[0], Name: chunk[1], |