Documentation
¶
Index ¶
- Variables
- func CheckAndErrorRequirements(names []string)
- func DefaultRun(command string) (string, string, error)
- func JustOut(command string) (string, error)
- func JustRun(command string) error
- func Run(commandStr string, outLimit int, memLimit uint64, timeout time.Duration) (string, string, error)
- func WhichNotInstalled(names []string) string
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrNonZeroExit = fmt.Errorf("nonZero Exit: The code finished with exit code != 0") ErrOutputLimit = fmt.Errorf("output Limit: Produced output is more that expected") ErrMemoryLimit = fmt.Errorf("memory Limit: The code is using too much memory") ErrTimedOut = fmt.Errorf("timed Out: the code did'nt complete execution in time") ErrNoOutput = fmt.Errorf("no Output: The Code doesn't have any output") ErrMalformedCommand = fmt.Errorf("malformed Command: The provided command is malformed") ErrNotValidExecutable = fmt.Errorf("specified program is not a valid executable") )
Functions ¶
func CheckAndErrorRequirements ¶
func CheckAndErrorRequirements(names []string)
prompt user that the program is not installed
func Run ¶
func Run(commandStr string, outLimit int, memLimit uint64, timeout time.Duration) (string, string, error)
Run a command with given limits for outbut (bytes), memory limiy (bytes) and duration duration is handling with golang's context so it's almost reliable but output limit and memory limit are handmaiden cross platform solutions known bugs: memory limit monitor routine sometimes experience starvation so it doen'st kill the program on-time
func WhichNotInstalled ¶
check that which program in provided list is not installed if all of them are installed, return an empty string
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.