executil

package
v0.11.13 Latest Latest
Warning

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

Go to latest
Published: Nov 5, 2026 License: MIT Imports: 7 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

executil

The package contains various helpers to interact binary execution

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Run

func Run(cmd string) (string, error)

Run the specified command in os shell (sh or powershell.exe) and return the output

func RunPS added in v0.0.4

func RunPS(cmd string) (string, error)

RunPS runs the specified command through powershell.exe

func RunSafe added in v0.0.4

func RunSafe(cmd ...string) (string, error)

RunSafe necessarily does not prevent command injection but prevents/limits damage to an extent "the os/exec package intentionally does not invoke the system shell and does not expand any glob patterns or handle other expansions, pipelines, or redirections typically done by shells" This also mitigates windows security risk in go<1.19. refer https://pkg.go.dev/os/exec

func RunSh

func RunSh(cmd ...string) (string, error)

RunSh the specified command through sh

Types

This section is empty.

Jump to

Keyboard shortcuts

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