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

Method parseIsAnswer

internal/service/search_parser/search_parser.go:322–335  ·  view source on GitHub ↗

parseIsAnswer check the result if only limit answer or not

(query *string)

Source from the content-addressed store, hash-verified

320
321// parseIsAnswer check the result if only limit answer or not
322func (sp *SearchParser) parseIsAnswer(query *string) (isAnswer bool) {
323 var (
324 q = *query
325 expr = `is:answer`
326 )
327
328 if strings.Contains(q, expr) {
329 isAnswer = true
330 q = strings.ReplaceAll(q, expr, "")
331 }
332
333 *query = strings.TrimSpace(q)
334 return
335}

Callers 1

ParseStructureMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected