MCPcopy Create free account
hub / github.com/jesseduffield/lazygit / ExpandRange

Function ExpandRange

pkg/commands/patch/transform.go:51–57  ·  view source on GitHub ↗

helper function that takes a start and end index and returns a slice of all indexes inbetween (inclusive)

(start int, end int)

Source from the content-addressed store, hash-verified

49// helper function that takes a start and end index and returns a slice of all
50// indexes inbetween (inclusive)
51func ExpandRange(start int, end int) []int {
52 expanded := []int{}
53 for i := start; i <= end; i++ {
54 expanded = append(expanded, i)
55 }
56 return expanded
57}
58
59func (self *patchTransformer) transform() *Patch {
60 header := self.transformHeader()

Callers 3

applySelectionMethod · 0.92
editHunkMethod · 0.92
TestTransformFunction · 0.85

Calls

no outgoing calls

Tested by 1

TestTransformFunction · 0.68