shellhelper

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Jun 21, 2024 License: AGPL-3.0 Imports: 11 Imported by: 6

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	WriteFile                  = Default_WriteFile
	FileExist                  = Default_FileExist
	ShellCall                  = Default_ShellCall
	ShellCallAsUser            = Default_ShellCallAsUser
	ShellCallWithInput         = Default_ShellCallWithInput
	AsyncShellCall             = Default_AsyncShellCall
	AsyncShellCallAsUser       = Default_AsyncShellCallAsUser
	CommandCall                = Default_CommandCall
	CommandCallAsUser          = Default_CommandCallAsUser
	CommandCallWithInput       = Default_CommandCallWithInput
	BinaryCommandCall          = Default_BinaryCommandCall
	BinaryCommandCallAsUser    = Default_BinaryCommandCallAsUser
	BinaryCommandCallWithInput = Default_BinaryCommandCallWithInput
)

Functions

func Default_AsyncShellCall added in v1.0.1

func Default_AsyncShellCall(cmd_ string) *exec.Cmd

func Default_AsyncShellCallAsUser added in v1.0.1

func Default_AsyncShellCallAsUser(username string, cmd_ string) *exec.Cmd

func Default_FileExist added in v1.0.1

func Default_FileExist(path string) bool

func Default_ShellCall added in v1.0.1

func Default_ShellCall(cmd_ string) string

func Default_ShellCallAsUser added in v1.0.1

func Default_ShellCallAsUser(username string, cmd_ string) string

func Default_ShellCallWithInput added in v1.0.1

func Default_ShellCallWithInput(input io.Reader, cmd_ string) string

func Default_WriteFile added in v1.0.1

func Default_WriteFile(file_name string, c string, args ...fs.FileMode) error

Types

type CmdBinaryResult

type CmdBinaryResult struct {
	Stdout   []byte
	Stderr   []byte
	Exitcode int
}

func Default_BinaryCommandCall added in v1.0.1

func Default_BinaryCommandCall(name string, arg ...string) CmdBinaryResult

func Default_BinaryCommandCallAsUser added in v1.0.1

func Default_BinaryCommandCallAsUser(username string, name string, arg ...string) CmdBinaryResult

func Default_BinaryCommandCallWithInput added in v1.0.1

func Default_BinaryCommandCallWithInput(input io.Reader, name string, arg ...string) CmdBinaryResult

type CmdResult

type CmdResult struct {
	Stdout   string
	Stderr   string
	Exitcode int
}

func Default_CommandCall added in v1.0.1

func Default_CommandCall(name string, arg ...string) CmdResult

func Default_CommandCallAsUser added in v1.0.1

func Default_CommandCallAsUser(username string, name string, arg ...string) CmdResult

func Default_CommandCallWithInput added in v1.0.1

func Default_CommandCallWithInput(input io.Reader, name string, arg ...string) CmdResult

Jump to

Keyboard shortcuts

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