context

package
v0.46.1 Latest Latest
Warning

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

Go to latest
Published: Dec 2, 2025 License: AGPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	RunDataKeyAssignees = "sb.assignees"
	RunDataKeyReviewers = "sb.reviewers"
)

Variables

This section is empty.

Functions

func Log

func Log(ctx context.Context) *zap.SugaredLogger

Log returns the logger from the context. If the context doesn't contain a logger then it returns the default logger.

func RunData

func RunData(ctx context.Context) map[string]string

RunData reads and returns runtime data from the context.

func WithLog

func WithLog(parent context.Context, logger *zap.SugaredLogger) context.Context

WithLog returns a context with logger added to it.

func WithRunData

func WithRunData(ctx context.Context, data map[string]string) context.Context

WithRunData adds run data to the context.Context. If the context already contains run data, then it updates the existing map. If a key in the map already exists then it gets overwritten.

Types

type CheckoutPath

type CheckoutPath struct{}

type PullRequestKey

type PullRequestKey struct{}

type RepositoryKey

type RepositoryKey struct{}

Jump to

Keyboard shortcuts

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