shell

package module
v0.0.0-...-bdf0a2d Latest Latest
Warning

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

Go to latest
Published: May 14, 2020 License: MIT Imports: 8 Imported by: 0

README

shell

Running shell commands and working with shell arguments

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CommandExists

func CommandExists(command string) bool

CommandExists check to see if the specified command exists

func ExecuteCommand

func ExecuteCommand(command string, args ...string) error

ExecuteCommand runs a command with given args

func ExecuteShellCommand

func ExecuteShellCommand(command string) error

ExecuteShellCommand runs a command via the shell

func ExecuteShellCommandAsync

func ExecuteShellCommandAsync(command string) error

ExecuteShellCommandAsync runs a command via the shell asynchronously

func GetFlagValue

func GetFlagValue(token string, shortFlag string, longFlag string) string

GetFlagValue returns the associated value for the specified flags given a token

func GetTokens

func GetTokens(command string) ([]string, error)

GetTokens retrieves the individual components of the given command

func IsFlag

func IsFlag(token string, shortFlag string, longFlag string) bool

IsFlag returns whether the given token matches either flag Specify flag arg as empty if that type of flag shouldn't be considered be considered

Types

This section is empty.

Jump to

Keyboard shortcuts

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