extension

package
v1.17.0 Latest Latest
Warning

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

Go to latest
Published: Nov 18, 2026 License: MIT Imports: 15 Imported by: 0 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 extension implements the circleci plugin mechanism.

Any executable named "circleci-<name>" found in PATH is treated as an extension and can be invoked transparently as "circleci <name>". The extension receives CIRCLE_TOKEN, CIRCLE_HOST, and best-effort project metadata via environment variables so it can call the CircleCI API without reimplementing authentication.

Index

Constants

View Source
const (
	// Testsuite is the official extension for running tests.
	Testsuite = "testsuite"
)

Variables

This section is empty.

Functions

func NewExtensionCmd

func NewExtensionCmd() *cobra.Command

func ParseRootFlags

func ParseRootFlags(cmd *cobra.Command) (extArgs []string)

ParseRootFlags populates the root command's persistent flags from os.Args for a command that sets DisableFlagParsing. Cobra never calls ParseFlags for such commands, so without this --theme, --debug, --quiet, --config, etc. would still hold their defaults when the root PersistentPreRunE sets up streams and loads config.

Parsing is non-interspersed, so it stops at the first positional argument (the extension name); flags after it belong to the extension and are returned verbatim along with any other trailing args.

func RegisterExtensions

func RegisterExtensions(rootCmd *cobra.Command)

RegisterExtensions registers extensions in the following order:

  • Managed extensions found in the extensions directory.
  • Official uninstalled extensions.
  • Unmanaged extensions found in PATH.

Types

This section is empty.

Jump to

Keyboard shortcuts

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