shell

package module
v0.0.0-...-2f021ba Latest Latest
Warning

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

Go to latest
Published: Jan 8, 2024 License: MIT Imports: 7 Imported by: ? 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

Go Shell

Overview

A simple wrapper around exec package to easily run shell commands in Go. It provides lots of defaults and also handles some common usage patterns like handing input and getting output from the command.

Environment Details

GoLang 1.21.5

Usage

Check the example folder for some basic usage guide of this package. To enable debugging while working with this package set DEBUG environment variable to true (Execute export DEBUG=true). Run the example: go run example/main.go.

Contributing

Feel free to contribute to this repository by opening issues, providing feedback, or submitting pull requests. Your contributions are highly appreciated!

License

This Repository is licensed under the MIT License. Feel free to use, modify, and distribute the code as per the terms of the license.

Documentation

Index

Constants

View Source
const (
	NoPanic      shellParams = "noPanic"
	WithoutShell shellParams = "WithoutShell"
	UseStdin     shellParams = "UseStdin"
	UseStdOut    shellParams = "UseStdOut"
)

Variables

This section is empty.

Functions

func Sh

func Sh(command string, params ...shellParams) (string, error)

func ShA

func ShA(command string, params ...shellParams) (string, int, error)

func ShI

func ShI(command string, input string, params ...shellParams) (string, error)

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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