MCPcopy Index your code
hub / github.com/jesseduffield/lazygit / Prepend

Function Prepend

pkg/utils/slice.go:147–149  ·  view source on GitHub ↗

Prepends items to the beginning of a slice. E.g. Prepend([]int{1,2}, 3, 4) = []int{3,4,1,2} Mutates original slice. Intended usage is to reassign the slice result to the input slice.

(slice []T, values ...T)

Source from the content-addressed store, hash-verified

145// E.g. Prepend([]int{1,2}, 3, 4) = []int{3,4,1,2}
146// Mutates original slice. Intended usage is to reassign the slice result to the input slice.
147func Prepend[T any](slice []T, values ...T) []T {
148 return append(values, slice...)
149}
150
151// Removes the element at the given index. Intended usage is to reassign the result to the input slice.
152func Remove[T any](slice []T, index int) []T {

Callers 7

getRebasingCommitsMethod · 0.92
getSequencerCommitsMethod · 0.92
LoadMethod · 0.92
getPerRepoConfigFilesMethod · 0.92
GetDisplayStringsMethod · 0.92
migrateAllBranchesLogCmdFunction · 0.92

Calls

no outgoing calls

Tested by

no test coverage detected