Documentation
¶
Overview ¶
Package fake provides a scorer.Scorer that decorates an existing scorer: it delegates to the wrapped implementation for the happy path, but injects an error when a change URI carries a failure marker of the form "sq-fake=<token>":
sq-fake=score-error -> non-nil error (the delegate is not called)
This lets tests exercise scorer error paths end-to-end (driven from a land request) while preserving real scoring behavior for unmarked changes. It is intended for examples and tests only, never production.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func New ¶
New returns a scorer.Scorer that delegates to the given scorer but returns an error when a change URI carries the "sq-fake=score-error" marker. The resolver resolves the batch's changes so the marker can be inspected; the delegate is the existing scorer implementation to wrap (e.g. heuristic or composite).
Types ¶
This section is empty.