mirror of
https://github.com/opencloud-eu/opencloud.git
synced 2026-01-02 10:21:07 -06:00
20 lines
420 B
Go
20 lines
420 B
Go
package godata
|
|
|
|
import "context"
|
|
|
|
const (
|
|
ALLPAGES = "allpages"
|
|
NONE = "none"
|
|
)
|
|
|
|
func ParseInlineCountString(ctx context.Context, inlinecount string) (*GoDataInlineCountQuery, error) {
|
|
result := GoDataInlineCountQuery(inlinecount)
|
|
if inlinecount == ALLPAGES {
|
|
return &result, nil
|
|
} else if inlinecount == NONE {
|
|
return &result, nil
|
|
} else {
|
|
return nil, BadRequestError("Invalid inlinecount query.")
|
|
}
|
|
}
|