common

package
v0.2.15 Latest Latest
Warning

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

Go to latest
Published: Aug 22, 2025 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FromHome

func FromHome(paths ...string) ([]string, error)

func JoinCommandParts

func JoinCommandParts(command string, args []string) string

func MakeDirAllIfNotExist

func MakeDirAllIfNotExist(dirPath string, perm fs.FileMode) error

func RunCommand

func RunCommand(o *RunCommandOpts) error

Types

type ParsedCmd

type ParsedCmd = syntax.File

func ParseCommand

func ParseCommand(cmd string) (*ParsedCmd, error)

type RunCommandOpts

type RunCommandOpts struct {
	Cmd     *ParsedCmd
	Stdout  io.Writer
	Stderr  io.Writer
	Timeout time.Duration
}

type StringNullWriter

type StringNullWriter struct{}

String Writer which satisfies Writer interface but writes nothing and returns an empty string on String() method (similar to strings.Builder)

func (*StringNullWriter) String

func (nw *StringNullWriter) String() string

func (*StringNullWriter) Write

func (nw *StringNullWriter) Write(p []byte) (int, error)

Jump to

Keyboard shortcuts

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