function
NewPath
Validate and build a path from segments computed at run time.
Example
authorEmail, err := query.NewPath("author", "email")
if err != nil {
return err
}Arguments
| Argument | Type | Description |
|---|---|---|
segments | []string | The segments value. |
Returns
The declared result.
(Path, error)How it works
For a name written in your code, pass the string, such as "seo.title", to a filter helper instead.
Full signature
Related types
PathAn immutable, validated document field path.