Versions in this module Expand all Collapse all v0 v0.3.0 Sep 28, 2026 Changes in this version + const PathGrammar + const RowKindArray + const RowKindBlocks + func ArrayRowKind(list []any) string + func ClearPath(obj map[string]any, key string) error + func ClearedValue(v any) any + func HasBlockRow(list []any) bool + func IsEditorState(obj map[string]any) bool + func Lookup(doc map[string]any, loc Location) (any, bool) + func ObservedArrayField(doc any, blockType, rel string) bool + func ObservedRowKind(doc any, blockType, rel string) string + func Replace(doc map[string]any, loc Location, value any) (map[string]any, error) + func SetPath(obj map[string]any, key string, value any) error + type ArrayInfo struct + Accepts []string + AcceptsAuthoritative *bool + AcceptsSource string + Kind string + type Hop struct + BlockType string + Index int + Key string + Row bool + Selector string + type Location struct + Hops []Hop + func KeyLocation(dotted string) Location + func (l Location) Last() Hop + func (l Location) Nested() bool + func (l Location) Parent() (row Location, rel string, ok bool) + func (l Location) Pattern() string + func (l Location) Root() string + func (l Location) Stable() string + func (l Location) String() string + func (l Location) With(h Hop) Location + type Node struct + Arrays map[string]ArrayInfo + At Location + Depth int + Field string + Nested map[string]int + Path string + Value any + func DocTree(doc map[string]any) []Node + func FindRow(doc map[string]any, id string) (Node, bool) + func Tree(list []any, at Location) []Node + type Path struct + Raw string + Steps []Step + func ParsePath(raw string) (Path, error) + type PathError struct + At Location + Container any + Detail string + Have []string + InRow bool + Kind PathErrorKind + Null bool + Path string + Rest []Step + func NotArrayError(p Path, r Resolved) *PathError + func (e *PathError) Error() string + func (e *PathError) NextLooksLikeRow() bool + func (e *PathError) RestAreKeys() bool + type PathErrorKind string + const PathAbsent + const PathKeyOnArray + const PathNotArray + const PathNotContainer + const PathRowOnObject + type Resolved struct + At Location + Value any + func Resolve(doc map[string]any, p Path) (Resolved, error) + type Step struct + Bracket bool + Sel *Selector + Text string + func (s Step) String() string v0.2.0 Sep 23, 2026 Changes in this version + const KeyBlockName + const KeyBlockType + const KeyID + const SelectorGrammar + var SelectorForms = []string + func Copy(list []any, src int, a Anchor) ([]any, int, error) + func Insert(list []any, row any, a Anchor) ([]any, int, error) + func LooksLikeBlocks(list []any) bool + func Move(list []any, src int, a Anchor) ([]any, int, error) + func Remove(list []any, idx []int) []any + func ResolveMany(list []any, sel Selector, field string) ([]int, error) + func ResolveOne(list []any, sel Selector, field string) (int, error) + func Set(list []any, idx int, patch map[string]any, unset []string) ([]any, error) + func StripIDs(v any) any + func Types(list []any) []string + type AmbiguousError struct + Field string + Have []Summary + Matched []int + Sel Selector + func (e *AmbiguousError) Error() string + type Anchor struct + Index int + Label string + Mode Mode + Sel Selector + func (a Anchor) Describe() string + type Kind string + const KindID + const KindIndex + const KindName + const KindType + type Mode string + const ModeAfter + const ModeAppend + const ModeBefore + const ModeIndex + type NoMatchError struct + Field string + Have []Summary + Sel Selector + func (e *NoMatchError) Error() string + type Selector struct + Index int + Kind Kind + Nth *int + Raw string + Value string + func ParseSelector(s string) (Selector, error) + func (s Selector) Match(list []any) []int + type Summary struct + BlockName string + BlockType string + Fields []string + ID string + Index int + Row any + Selector string + func Summarize(list []any) []Summary