command

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jan 18, 2026 License: MIT Imports: 1 Imported by: 0

Documentation

Overview

Package command provides structures and functions to create and manage system commands.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Command

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

Command represents a system command with its name and arguments.

func NewCommand

func NewCommand(
	name string,
	args ...string,
) Command

NewCommand creates and returns a new Command instance with the specified name and arguments.

Parameters:

  • name: The name of the command to be executed.
  • args: A variadic list of arguments for the command.

func (Command) Args

func (c Command) Args() []string

Args returns a copy of the arguments slice of the Command.

func (Command) Name

func (c Command) Name() string

Name returns the name of the Command.

func (Command) String

func (c Command) String() string

String returns a string representation of the Command, combining the command name and its arguments.

Directories

Path Synopsis
Package output provides structures and functions to handle command output.
Package output provides structures and functions to handle command output.

Jump to

Keyboard shortcuts

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