system

package
v0.9.8 Latest Latest
Warning

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

Go to latest
Published: Mar 7, 2025 License: GPL-3.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DumpToJsonString

func DumpToJsonString(data interface{}) (string, error)

func DumpToYamlString

func DumpToYamlString(data interface{}) (string, error)

func JsonCommandOutput

func JsonCommandOutput[R any](query *CmdCall) (R, error)

func LoadJSONFromString

func LoadJSONFromString[R any](jsonStr string) (R, error)

func LoadYamlFromString

func LoadYamlFromString[R any](yamlStr string) (R, error)

func OsExec

func OsExec(query *CmdCall) error

func OsExecAndTailToLog

func OsExecAndTailToLog(query *CmdCall) ([]byte, error)

func OsExecWithExitCode

func OsExecWithExitCode(query *CmdCall) (int, error)

func OsStartAndTailToLog

func OsStartAndTailToLog(query *CmdCall) (*exec.Cmd, error)

func RawCommandOutput

func RawCommandOutput(query *CmdCall) (string, error)

func UnTemplateWithGoTemplate

func UnTemplateWithGoTemplate(tpl string, data any) (string, error)

Types

type CmdCall

type CmdCall struct {
	Command string
	Args    []string
	Cwd     *string
	// contains filtered or unexported fields
}

func NewCmdCall

func NewCmdCall(log types.ILogger, command string, args ...string) *CmdCall

func (*CmdCall) String

func (c *CmdCall) String() string

Jump to

Keyboard shortcuts

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