Documentation ¶
Index ¶
- Constants
- func ExecName(name string) string
- func FilepathClean(s string) string
- func FilepathHasDirPrefix(s, prefix string) bool
- func FilepathSplitAt(s string, n int) string
- func FilesystemFilename(filename string) (string, error)
- func GetEnv(env []string, key string) string
- func GetFreeTcpPort() (int, error)
- func HomeEnvVar() string
- func IsCaseInsensitiveFileSystemCached() (bool, error)
- func KillExecCmd(cmd *exec.Cmd) error
- func OpenBrowser(url string) error
- func OpenFilemanager(filename string) error
- func RandomPort(simpleSeed, min, max int) int
- func RunCmdCombinedOutput(cmd *Cmd, rd io.Reader) ([]byte, error)
- func RunCmdOutputs(cmd *Cmd, rd io.Reader) (sout []byte, serr []byte, _ error)
- func RunCmdStdoutAndStderrInErr(cmd *Cmd, rd io.Reader) ([]byte, error)
- func SetEnv(env []string, key, value string) []string
- func SetEnvs(env []string, addEnv []string) []string
- func SetupExecCmdSysProcAttr(cmd *exec.Cmd)
- func ShellRunArgs(args ...string) []string
- type Cmd
- type TmpFiles
- func (tf *TmpFiles) MkdirInTmp(path string) (string, error)
- func (tf *TmpFiles) MkdirInTmpOrPanic(path string) string
- func (tf *TmpFiles) RemoveAll() error
- func (tf *TmpFiles) WriteFileInTmp(path string, src []byte) (string, error)
- func (tf *TmpFiles) WriteFileInTmp2OrPanic(path string, src string) string
- func (tf *TmpFiles) WriteFileInTmpOrPanic(path string, src []byte) string
Constants ¶
View Source
const EscapeRune = '\\'
Variables ¶
This section is empty.
Functions ¶
func FilepathClean ¶
func FilepathHasDirPrefix ¶
func FilepathSplitAt ¶
Result does not start with separator.
func FilesystemFilename ¶
func GetFreeTcpPort ¶
func HomeEnvVar ¶
func HomeEnvVar() string
func KillExecCmd ¶
func RandomPort ¶
func RunCmdStdoutAndStderrInErr ¶
Adds stderr to err if it happens.
func SetupExecCmdSysProcAttr ¶
func ShellRunArgs ¶
Types ¶
type Cmd ¶
type Cmd struct { *exec.Cmd PreOutputCallback func() NoEnsureStop bool // contains filtered or unexported fields }
func (*Cmd) Cancel ¶
func (cmd *Cmd) Cancel()
can be called before a Start(), clears all possible resources
type TmpFiles ¶
type TmpFiles struct {
Dir string
}
func NewTmpFiles ¶
func (*TmpFiles) MkdirInTmpOrPanic ¶
Returns the filename
func (*TmpFiles) WriteFileInTmp ¶
func (*TmpFiles) WriteFileInTmp2OrPanic ¶
Returns the filename
Click to show internal directories.
Click to hide internal directories.