fakemarker

package
v0.0.3-20260707224429-... Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 7, 2026 License: Apache-2.0 Imports: 2 Imported by: 0

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

View Source
const Prefix = "sq-fake="

Prefix introduces a marker token in a change URI: "sq-fake=<token>".

Variables

This section is empty.

Functions

func Token

func Token(uris []string) string

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://o/r/pull/1/a?sq-fake=build-fail&attempt=2").

func TokenInChanges

func TokenInChanges(changes []change.Change) string

TokenInChanges returns the first marker token found across all changes' URIs, or "" if none carry one.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL