cmdhelper

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: May 29, 2018 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Overview

Package cmdhelper provides functions to make working os/exec Command easier.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BulkUpdateEnv

func BulkUpdateEnv(env []string, update map[string]string) []string

BulkUpdateEnv returns a new slice suitable for use with exec.Cmd.Env based on env but with environment variables for the keys in update added/changed to the values in update.

func IsTruthyEnv

func IsTruthyEnv(name string) bool

IsTruthyEnv return true if name is set in the environment and has value other than 0 or false (case-insensitive).

func UpdateEnv

func UpdateEnv(env []string, name, value string) []string

UpdateEnv takes an environment array, an env var name, and an environment var value and updates the current definition of the env var or adds a new environment variable definition.

Types

This section is empty.

Jump to

Keyboard shortcuts

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