MCPcopy Create free account
hub / github.com/cli/cli / clone

Method clone

pkg/cmd/pr/shared/editable.go:322–339  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

320}
321
322func (es *EditableSlice) clone() EditableSlice {
323 cpy := EditableSlice{
324 Edited: es.Edited,
325 Selectable: es.Selectable,
326 // Shallow copies since no mutation.
327 Options: es.Options,
328 // Copy mutable string slices.
329 Add: make([]string, len(es.Add)),
330 Remove: make([]string, len(es.Remove)),
331 Value: make([]string, len(es.Value)),
332 Default: make([]string, len(es.Default)),
333 }
334 copy(cpy.Add, es.Add)
335 copy(cpy.Remove, es.Remove)
336 copy(cpy.Value, es.Value)
337 copy(cpy.Default, es.Default)
338 return cpy
339}
340
341func (ea *EditableAssignees) clone() EditableAssignees {
342 return EditableAssignees{

Callers 4

CloneMethod · 0.45
cloneMethod · 0.45
cloneMethod · 0.45
cloneMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected