Documentation
¶
Overview ¶
Package fakemarker holds the shared "sq-fake=<token>" change-URI marker convention used by the extension fakes to inject failures from a request payload. Each fake recognizes its own tokens (e.g. "build-fail", "push-error"); this package only locates a token within change URIs so the parsing lives in one place instead of being copied into every fake. It is intended for examples and tests only, never production.
Index ¶
Constants ¶
const Prefix = "sq-fake="
Prefix introduces a marker token in a change URI: "sq-fake=<token>".
Variables ¶
This section is empty.
Functions ¶
func Token ¶
Token returns the marker token embedded in the first URI that carries one, or "" if none do. The token ends at the first "&" or "#" delimiter, so a marker may sit among other query parameters or a fragment (e.g. "github://github.example.com/o/r/pull/1/a?sq-fake=build-fail&attempt=2").
func TokenInChanges ¶
TokenInChanges returns the first marker token found across all changes' URIs, or "" if none carry one.
Types ¶
This section is empty.