cli

package
v0.0.0-...-d23cf24 Latest Latest
Warning

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

Go to latest
Published: Mar 27, 2026 License: Apache-2.0, BSD-3-Clause, MIT Imports: 22 Imported by: 3

Documentation

Overview

Package cli provides the entrypoint for runsc binaries.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Run

func Run(commands map[util.SubCommand]string, helpTopics []subcommands.Command)

Run runs the binary, whose behavior is determined by the subcommand passed on the command line. commands is a mapping of all top level runsc commands to their command group name. helpTopics is a list of additional help topics.

Types

type Help

type Help struct {
	// contains filtered or unexported fields
}

Help implements subcommands.Command for the "help" command. The 'help' command prints help for commands registered to a Commander but also allows for registering additional help commands that print other documentation.

func NewHelp

func NewHelp(cdr *subcommands.Commander) *Help

NewHelp returns a help command for the given commander.

func (*Help) Execute

func (h *Help) Execute(ctx context.Context, f *flag.FlagSet, args ...any) subcommands.ExitStatus

Execute implements subcommands.Command.Execute.

func (*Help) Name

func (*Help) Name() string

Name implements subcommands.Command.Name.

func (*Help) Register

func (h *Help) Register(cmd subcommands.Command)

Register registers a new help command.

func (*Help) SetFlags

func (h *Help) SetFlags(*flag.FlagSet)

SetFlags implements subcommands.Command.SetFlags.

func (*Help) Synopsis

func (*Help) Synopsis() string

Synopsis implements subcommands.Command.Synopsis.

func (*Help) Usage

func (*Help) Usage() string

Usage implements subcommands.Command.Usage.

Directories

Path Synopsis
Package maincli is the main entrypoint for runsc.
Package maincli is the main entrypoint for runsc.

Jump to

Keyboard shortcuts

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