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