self

package
v3.115.4 Latest Latest
Warning

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

Go to latest
Published: Jan 13, 2026 License: MIT Imports: 2 Imported by: 0

Documentation

Overview

Package self implements helpers for self-interaction.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func OverridePath

func OverridePath(parent context.Context, path string) context.Context

OverridePath changes the self-path used within a context. This is usually only used for testing purposes (creating a mock of buildkite-agent.)

func Path

func Path(ctx context.Context) string

Path returns an absolute file path to buildkite-agent. If an absolute path cannot be found, it defaults to "buildkite-agent" on the assumption it is in $PATH. Self-executing with this path can still fail if someone is playing games (e.g. unlinking the binary after starting it).

Types

This section is empty.

Jump to

Keyboard shortcuts

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