parseAccepted check the search is limit accepted answer or not
(query *string)
| 286 | |
| 287 | // parseAccepted check the search is limit accepted answer or not |
| 288 | func (sp *SearchParser) parseAccepted(query *string) (accepted bool) { |
| 289 | var ( |
| 290 | q = *query |
| 291 | expr = `isaccepted:yes` |
| 292 | ) |
| 293 | |
| 294 | if strings.Contains(q, expr) { |
| 295 | accepted = true |
| 296 | q = strings.ReplaceAll(q, expr, "") |
| 297 | } |
| 298 | |
| 299 | *query = strings.TrimSpace(q) |
| 300 | return |
| 301 | } |
| 302 | |
| 303 | // parseQuestionID check whether specified question's id |
| 304 | func (sp *SearchParser) parseQuestionID(query *string) (questionID string) { |