envz

package
v0.13.0 Latest Latest
Warning

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

Go to latest
Published: Feb 11, 2025 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

Package envz provides various utilities for working with environment variables.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MarshalEnviron

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

MarshalEnviron converts an env map to OS-like environ.

func MustSetenv

func MustSetenv(key, value string)

MustSetenv is like os.Setenv, but panics on error.

func MustUnsetenv

func MustUnsetenv(key string)

MustUnsetenv is like os.Unsetenv, but panics on error.

func MustWithEnv added in v0.13.0

func MustWithEnv(env map[string]string, f func())

MustWithEnv runs the closure after setting the given env, cleans up after.

func UnmarshalEnviron

func UnmarshalEnviron(environ []string, filterPrefix string) map[string]string

UnmarshalEnviron converts an OS-like environ to env map.

Types

This section is empty.

Jump to

Keyboard shortcuts

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