Clone creates a mostly-shallow copy of Editable suitable for use in parallel go routines. Fields that would be mutated will be copied.
()
| 289 | // Clone creates a mostly-shallow copy of Editable suitable for use in parallel |
| 290 | // go routines. Fields that would be mutated will be copied. |
| 291 | func (e *Editable) Clone() Editable { |
| 292 | return Editable{ |
| 293 | Title: e.Title.clone(), |
| 294 | Body: e.Body.clone(), |
| 295 | Base: e.Base.clone(), |
| 296 | Reviewers: e.Reviewers.clone(), |
| 297 | ReviewerSearchFunc: e.ReviewerSearchFunc, |
| 298 | Assignees: e.Assignees.clone(), |
| 299 | AssigneeSearchFunc: e.AssigneeSearchFunc, |
| 300 | Labels: e.Labels.clone(), |
| 301 | Projects: e.Projects.clone(), |
| 302 | Milestone: e.Milestone.clone(), |
| 303 | IssueType: e.IssueType.clone(), |
| 304 | IssueTypeNameToID: e.IssueTypeNameToID, |
| 305 | ApiActorsSupported: e.ApiActorsSupported, |
| 306 | // Shallow copy since no mutation. |
| 307 | Metadata: e.Metadata, |
| 308 | } |
| 309 | } |
| 310 | |
| 311 | func (es *EditableString) clone() EditableString { |
| 312 | return EditableString{ |