type

Path

An immutable, validated document field path.

Properties

PropertyTypeDescription
Segments()[]stringA defensive copy of the path segments.
String()stringCanonical dot-separated form.

How it works

Segments begin with a lowercase letter and may contain letters, digits, underscores, or hyphens. Paths are limited to MaxPathSegments (64) and MaxPathBytes (4096).

Path implements JSON encoding as its canonical dot-separated string.

Full signature

type Path struct { // contains filtered or unexported fields }

Source query/path.go:45

Methods

Related guides