github.com/CiscoM31/godata@v1.0.10/inlinecount_parser.go (about) 1 package godata 2 3 import "context" 4 5 const ( 6 ALLPAGES = "allpages" 7 NONE = "none" 8 ) 9 10 func ParseInlineCountString(ctx context.Context, inlinecount string) (*GoDataInlineCountQuery, error) { 11 result := GoDataInlineCountQuery(inlinecount) 12 if inlinecount == ALLPAGES { 13 return &result, nil 14 } else if inlinecount == NONE { 15 return &result, nil 16 } else { 17 return nil, BadRequestError("Invalid inlinecount query.") 18 } 19 }