Documentation
¶
Overview ¶
Package scope keeps the targets an environment or a step selects in one form per file.
The platform stores one scope and reports it twice: as `predicate`, and, when it is a query, the same query again as `query`. Sent both, it takes `query` and ignores `predicate`. A file holding both would hide an edit to `predicate` behind the unchanged `query`, so files hold `query` when the platform reports one, and `predicate`, which is deprecated, only for a scope that has no query.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Comparable ¶
Comparable makes the scopes of a file and of the platform's version comparable by the platform's rule: a file holding `query` is compared by its query alone; one without is compared by its predicate, whatever query the platform derived from it. It returns a hint for each scope the file still selects with a predicate while the platform holds a query, naming the query to use instead.
Types ¶
type Holder ¶
type Holder struct {
// Path is how messages name it: "" for the document itself, or
// "lanes[0].steps[1].radius".
Path string
Map *jsyaml.Map
}
Holder is a map holding a scope, and where in its document it sits.
func Environment ¶
Environment finds the scope of an environment: the document itself.