Versions in this module Expand all Collapse all v0 v0.1.3 Jun 13, 2023 v0.1.2 Jun 13, 2023 v0.1.1 Jun 13, 2023 v0.1.0 Jun 13, 2023 Changes in this version + var ErrIllegalAbsPath = errors.New(...) — linux/amd64 + var ErrIllegalCmdsFields = errors.New("the fields of cmds has illegal prefix `/` or contains illegal string `..`") — linux/amd64 + var ErrIllegalRelativePath = errors.New("relativePath contains illegal string `..` and must not be absolute path") — linux/amd64 + func ValidateAbsPath(absPath string, basedir string) error — linux/amd64 + func ValidateRelativePath(relativePath string) error — linux/amd64 + type Result struct — linux/amd64 + Code int + Stderr string + Stdout string + func ExecBatchCmdS(timeout time.Duration, dir string, cmds string) (*Result, error) + func ExecCmd(timeout time.Duration, dir string, cmdName string, args ...string) (*Result, error) + func ExecRestrictedBatchCmdS(timeout time.Duration, basedir, relativePath, cmds string) (*Result, error)