| 691 | } |
| 692 | |
| 693 | func dropboxAPIEndpointFromMessage(message string) (string, bool) { |
| 694 | const prefix = `Error in call to API function "` |
| 695 | idx := strings.Index(message, prefix) |
| 696 | if idx < 0 { |
| 697 | return "", false |
| 698 | } |
| 699 | start := idx + len(prefix) |
| 700 | end := strings.Index(message[start:], `"`) |
| 701 | if end < 0 { |
| 702 | return "", false |
| 703 | } |
| 704 | end += start |
| 705 | if start == end { |
| 706 | return "", false |
| 707 | } |
| 708 | return message[start:end], true |
| 709 | } |
| 710 | |
| 711 | func isDropboxAPISummary(message string) bool { |
| 712 | if message == "" || strings.ContainsAny(message, " \t\r\n\"") || !strings.Contains(message, "/") { |