(content string, left, right *int, uniqueIDs map[string]struct{}, questionLinks *[]QuestionLink)
| 62 | } |
| 63 | |
| 64 | func processURL(content string, left, right *int, uniqueIDs map[string]struct{}, questionLinks *[]QuestionLink) { |
| 65 | for *right < len(content) && (isDigit(content[*right]) || isLetter(content[*right])) { |
| 66 | *right++ |
| 67 | } |
| 68 | questionID := content[*left+len("/questions/") : *right] |
| 69 | |
| 70 | answerID := "" |
| 71 | if *right < len(content) && content[*right] == '/' { |
| 72 | *left = *right + 1 |
| 73 | *right = *left |
| 74 | for *right < len(content) && (isDigit(content[*right]) || isLetter(content[*right])) { |
| 75 | *right++ |
| 76 | } |
| 77 | answerID = content[*left:*right] |
| 78 | } |
| 79 | |
| 80 | addUniqueID(questionID, answerID, QuestionLinkTypeURL, uniqueIDs, questionLinks) |
| 81 | } |
| 82 | |
| 83 | func processID(content string, left, right *int, uniqueIDs map[string]struct{}, questionLinks *[]QuestionLink) { |
| 84 | for *right < len(content) && (isDigit(content[*right]) || isLetter(content[*right])) { |
no test coverage detected