MCPcopy Index your code
hub / github.com/apache/answer / parseAccepted

Method parseAccepted

internal/service/search_parser/search_parser.go:288–301  ·  view source on GitHub ↗

parseAccepted check the search is limit accepted answer or not

(query *string)

Source from the content-addressed store, hash-verified

286
287// parseAccepted check the search is limit accepted answer or not
288func (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
304func (sp *SearchParser) parseQuestionID(query *string) (questionID string) {

Callers 1

ParseStructureMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected