cli

package
v0.1.6 Latest Latest
Warning

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

Go to latest
Published: Dec 1, 2026 License: MIT Imports: 35 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 cli dispatches bitc's subcommands. Each subcommand registers itself from its own file (cmd_*.go), so tasks never edit a shared table.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Main

func Main(args []string, std Std) (code int)

Main parses global flags, dispatches, and turns any panic into exit 69 (spec 4).

func PlatformCheck

func PlatformCheck(goos string) error

PlatformCheck is 69 off Linux and macOS (spec 1). macOS is a client build: local pools and exec plugins, the Linux-only features refused (config.checkPlatform, exit.LinuxOnly).

func Register

func Register(name string, c Command)

Register adds a subcommand; names starting "__" are hidden from usage.

func RegisterConfigSub

func RegisterConfigSub(name string, c Command)

RegisterConfigSub adds `bitc config <name>` (hook-env registers from cmd_hookenv.go).

Types

type Command

type Command func(ctx context.Context, g config.Flags, args []string, std Std) int

Command runs one subcommand and returns its exit code.

type Std

type Std struct{ In, Out, Err *os.File }

Std is the process's standard files.

Jump to

Keyboard shortcuts

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