Help us shape the future of Go! Take the 2026 Go Developer Survey

cli

package
v0.3.2 Latest Latest
Warning

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

Go to latest
Published: Oct 29, 2026 License: BSD-3-Clause Imports: 12 Imported by: 0

Documentation

Overview

Package cli is the `wctr compose` command tree: an exported cobra command the engine's wctr wires as a subcommand, and that cmd/wctr-compose runs on its own.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Command

func Command(opt Options) *cobra.Command

Command returns the `compose` command.

Types

type Options

type Options struct {
	// FS is the file system Compose files are read from, its root the
	// top the project may not leave. Nil: the host's, rooted at the
	// project directory (os.OpenRoot: neither `..` nor a symbolic link
	// leaves it). A browser host passes its own.
	FS fs.FS
	// Environ is the environment interpolation reads. Nil: the process
	// environment (os.Environ).
	Environ func() []string
	// Client reaches the engine. Inside wctr it is wctr's own (-H, or the
	// playground's in-process transport: wctr's cli.Options.Extra hands
	// it over as Engine.Client). Nil: the command adds its own -H/--host
	// flag ($WCTR_HOST, else the default socket) and uses api.NewClient.
	Client func() (*api.Client, error)
	// BuildCache keeps build steps between builds. Nil: natively the
	// cache `wctr build` keeps ($XDG_CACHE_HOME/wasmcontainers); with a
	// host FS (a browser), one per build unless the host passes its own.
	BuildCache builder.Cache
}

Options are what the host gives the command tree.

Jump to

Keyboard shortcuts

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