(handle string)
| 352 | } |
| 353 | |
| 354 | func (r *CopilotReplacer) replace(handle string) string { |
| 355 | if !strings.EqualFold(handle, "@copilot") { |
| 356 | return handle |
| 357 | } |
| 358 | if r.returnLogin { |
| 359 | return r.copilotLogin |
| 360 | } |
| 361 | return api.CopilotActorName |
| 362 | } |
| 363 | |
| 364 | // ReplaceSlice replaces usages of `@copilot` in a slice with Copilot's login. |
| 365 | func (r *CopilotReplacer) ReplaceSlice(handles []string) []string { |