shell

package
v0.1.0-rc3 Latest Latest
Warning

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

Go to latest
Published: Mar 16, 2026 License: GPL-3.0 Imports: 4 Imported by: 0

Documentation

Overview

Copyright © 2025 Gonzalo Alvarez

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Cmd

type Cmd interface {
	SetDir(dir string)
	SetEnv(env []string)
	SetStdin(r io.Reader)
	SetStdout(w io.Writer)
	SetStderr(w io.Writer)
	GetEnv(key string) string
	SetExtraFiles([]*os.File)
	Output() ([]byte, error)
	Run() error
	Start() error
	Wait() error
	CombinedOutput() ([]byte, error)
}

type Executor

type Executor interface {
	LookPath(file string) (string, error)
	Command(name string, args ...string) Cmd
}

type SystemCmd

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

func (*SystemCmd) CombinedOutput

func (c *SystemCmd) CombinedOutput() ([]byte, error)

func (*SystemCmd) GetEnv

func (c *SystemCmd) GetEnv(key string) string

func (*SystemCmd) Output

func (c *SystemCmd) Output() ([]byte, error)

func (*SystemCmd) Run

func (c *SystemCmd) Run() error

func (*SystemCmd) SetDir

func (c *SystemCmd) SetDir(dir string)

func (*SystemCmd) SetEnv

func (c *SystemCmd) SetEnv(env []string)

func (*SystemCmd) SetExtraFiles

func (c *SystemCmd) SetExtraFiles(files []*os.File)

func (*SystemCmd) SetStderr

func (c *SystemCmd) SetStderr(w io.Writer)

func (*SystemCmd) SetStdin

func (c *SystemCmd) SetStdin(r io.Reader)

func (*SystemCmd) SetStdout

func (c *SystemCmd) SetStdout(w io.Writer)

func (*SystemCmd) Start

func (c *SystemCmd) Start() error

func (*SystemCmd) Wait

func (c *SystemCmd) Wait() error

type SystemExecutor

type SystemExecutor struct{}

func (*SystemExecutor) Command

func (e *SystemExecutor) Command(name string, args ...string) Cmd

func (*SystemExecutor) LookPath

func (e *SystemExecutor) LookPath(file string) (string, error)

Jump to

Keyboard shortcuts

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