functionNewPathfunc NewPath(segments ...string) (Path, error)Validate and build a path from segments.Source query/path.go:34@param segmentsThe segments value.@returnsThe declared result.ExamplegoCopyauthorEmail, err := query.NewPath("author", "email") if err != nil { return err }Related typesPathAn immutable, validated document field path.