genv

package
v1.8.4-0...-cbac34e Latest Latest
Warning

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

Go to latest
Published: Sep 10, 2019 License: MIT Imports: 2 Imported by: 0

Documentation

Overview

Package genv provides operations for environment variables of system.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func All

func All() []string

All returns a copy of strings representing the environment, in the form "key=value".

func Build

func Build(m map[string]string) []string

Build builds a map to a environment variable slice.

func Contains

func Contains(key string) bool

Contains checks whether the environment variable named <key> exists.

func Get

func Get(key string, def ...string) string

Get returns the value of the environment variable named by the <key>. It returns given <def> if the variable does not exist in the environment.

func Map

func Map() map[string]string

Map returns a copy of strings representing the environment as a map.

func Remove

func Remove(key string) error

Remove deletes a single environment variable.

func Set

func Set(key, value string) error

Set sets the value of the environment variable named by the <key>. It returns an error, if any.

Types

This section is empty.

Jump to

Keyboard shortcuts

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