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

Method parseIsQuestion

internal/service/search_parser/search_parser.go:235–248  ·  view source on GitHub ↗

parseIsQuestion check the result if only limit question or not

(query *string)

Source from the content-addressed store, hash-verified

233
234// parseIsQuestion check the result if only limit question or not
235func (sp *SearchParser) parseIsQuestion(query *string) (isQuestion bool) {
236 var (
237 q = *query
238 expr = `is:question`
239 )
240
241 if strings.Contains(q, expr) {
242 q = strings.ReplaceAll(q, expr, "")
243 isQuestion = true
244 }
245
246 *query = strings.TrimSpace(q)
247 return
248}
249
250// parseViews check search has views or not
251func (sp *SearchParser) parseViews(query *string) (views int) {

Callers 1

ParseStructureMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected