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

Method clone

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

Source from the content-addressed store, hash-verified

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