cli

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Sep 30, 2026 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Overview

Package cli wires the taiga command tree.

Index

Constants

This section is empty.

Variables

View Source
var Version = "dev"

Version is set at build time with -ldflags "-X github.com/BasisTI/taiga-cli/internal/cli.Version=...".

Functions

func Main

func Main(args []string, in io.Reader, out, errOut io.Writer, env func(string) string, outTTY bool) int

Main runs the CLI and returns the process exit code.

Types

type App

type App struct {
	In     io.Reader
	Out    io.Writer
	Err    io.Writer
	Env    func(string) string
	OutTTY bool
	// Cwd is the working directory used to find .taiga.toml; empty means os.Getwd().
	Cwd string
	// HTTP overrides the HTTP client; nil means a client with httpTimeout.
	HTTP *http.Client
	// TokenSource builds the credentials for a run; nil means the auth resolver.
	TokenSource func(context.Context, *RunContext) (taiga.TokenSource, error)
	// contains filtered or unexported fields
}

App carries the process I/O and environment so commands are testable.

func (*App) Run

func (a *App) Run(args []string) int

Run executes args against the app and returns the process exit code.

type RunContext

type RunContext struct {
	Paths config.Paths
	File  config.File
	Ctx   config.Context
}

RunContext is the resolved configuration for one command run.

Jump to

Keyboard shortcuts

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