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

inprocess

package
v0.21.0 Latest Latest
Warning

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

Go to latest
Published: Jul 10, 2026 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

Package inprocess provides in-process CLI execution for tests.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CLI

type CLI struct{}

CLI provides in-process CLI execution for faster tests. Instead of spawning a new process for each command, it calls the CLI directly.

func NewInProcessCLI

func NewInProcessCLI() *CLI

NewInProcessCLI creates a new in-process CLI runner.

func (*CLI) Run

func (c *CLI) Run(workDir string, args ...string) Result

Run executes a stackit command in-process. The workDir specifies the working directory for the command. Returns the combined stdout/stderr output and any error.

func (*CLI) RunString

func (c *CLI) RunString(workDir string, cmdStr string) Result

RunString executes a stackit command from a single string (like "create feature -m 'test'").

type Result

type Result struct {
	Output string
	Err    error
}

Result contains the result of an in-process CLI execution.

Jump to

Keyboard shortcuts

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