regula icon indicating copy to clipboard operation
regula copied to clipboard

Improve client NewEvaluator documentation about prefix

Open asdine opened this issue 5 years ago • 0 comments

It is not clear that the prefix parameter is only used to select a subset of rulesets from the server and store the paths of these rulesets as is in the ruleset buffer. The client.NewEvaluator simply matches the following HTTP API:

GET /rulesets/some-prefix?list
GET /rulesets/some-prefix?watch

which returns rulesets and their absolute paths.

What is confusing is that some expect the buffer to contain the path stripped from the prefix.

This

some-ruleset

instead of this

/some/path/to/some-ruleset

Improve the docstring in order to remove this confusion.

asdine avatar Sep 25 '18 16:09 asdine