fakemarker

package
v0.1.0-dev.10 Latest Latest
Warning

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

Go to latest
Published: Jun 26, 2026 License: Apache-2.0 Imports: 2 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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