envutil

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Aug 5, 2022 License: Apache-2.0 Imports: 5 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.

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