envutil

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Aug 3, 2022 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AppendToPathList

func AppendToPathList(list string, value ...string) string

AppendToPathList appends a string to another string containing a list of paths, separated by os.PathListSeparator (like the PATH and LD_LIBRARY_PATH environment variables). It doesn't add duplicates and removes any empty strings from the list.

func Getenv

func Getenv(env []string, key string) string

Like os.Getenv but uses the specified environment instead of the current process environment.

func LookupEnv

func LookupEnv(env []string, key string) (string, bool)

Like os.LookupEnv but uses the specified environment instead of the current process environment.

func Setenv

func Setenv(env []string, key, value string) ([]string, error)

Like os.Setenv but uses the specified environment instead of the current process environment.

func ToMap

func ToMap(env []string) map[string]string

ToMap converts the specified strings representing an environment in the form "key=value" to a map.

Types

This section is empty.

Jump to

Keyboard shortcuts

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